doc: update documentation to reach higher coverage
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
use crate::*;
|
||||
|
||||
impl Catalog {
|
||||
/// Returns the number of entities in the catalog.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// The total number of entities currently held in the catalog's memory.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// Returns `Err(FailedTo::LockCatalog)` if the catalog's internal mutex
|
||||
/// could not be locked.
|
||||
pub fn len(&self) -> Result<usize, FailedTo> {
|
||||
self.with_items(|items| Ok(items.len()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user