doc: update documentation of catalog.load_by_id
This commit is contained in:
@@ -20,6 +20,11 @@ impl Catalog {
|
|||||||
/// # Arguments
|
/// # Arguments
|
||||||
///
|
///
|
||||||
/// * `id` - The ID of the entity to load.
|
/// * `id` - The ID of the entity to load.
|
||||||
|
///
|
||||||
|
/// # Errors
|
||||||
|
///
|
||||||
|
/// Returns `Err(FailedTo::LoadFromDB)` if there is an issue loading the entity
|
||||||
|
/// from the database.
|
||||||
pub fn load_by_id(&mut self, id: &str) -> Result<(), FailedTo> {
|
pub fn load_by_id(&mut self, id: &str) -> Result<(), FailedTo> {
|
||||||
let path = path::Path::new(&self.path);
|
let path = path::Path::new(&self.path);
|
||||||
self.on_items(|items| {
|
self.on_items(|items| {
|
||||||
|
|||||||
Reference in New Issue
Block a user