doc: update documentation of catalog.persist
This commit is contained in:
@@ -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| {
|
||||||
|
|||||||
Reference in New Issue
Block a user