doc: update documentation of catalog.persist

This commit is contained in:
2025-11-11 11:16:22 +01:00
parent 44f548562b
commit 2aa1e7cb46

View File

@@ -18,6 +18,11 @@ impl Catalog {
/// removed from the in-memory catalog. /// removed from the in-memory catalog.
/// - All other entities that were successfully persisted (new or updated) have /// - All other entities that were successfully persisted (new or updated) have
/// their state changed to `EntityState::Loaded`. /// their state changed to `EntityState::Loaded`.
///
/// # Errors
///
/// Returns `Err(FailedTo::PersistCatalog)` if there is an issue writing the
/// changes to the database.
pub fn persist(&self) -> result::Result<(), FailedTo> { pub fn persist(&self) -> result::Result<(), FailedTo> {
let path = path::Path::new(&self.path); let path = path::Path::new(&self.path);
self.on_items(|items| { self.on_items(|items| {