pub trait PersistableContiguous: MutableContiguous {
// Required methods
fn commit(&mut self) -> impl Future<Output = Result<(), Error>>;
fn sync(&mut self) -> impl Future<Output = Result<(), Error>>;
fn close(self) -> impl Future<Output = Result<(), Error>>;
fn destroy(self) -> impl Future<Output = Result<(), Error>>;
}Required Methods§
Sourcefn commit(&mut self) -> impl Future<Output = Result<(), Error>>
fn commit(&mut self) -> impl Future<Output = Result<(), Error>>
Durably persist the journal but does not write all data, potentially leaving recovery required on startup.
For a stronger guarantee that eliminates potential recovery, use Self::sync instead.
Sourcefn sync(&mut self) -> impl Future<Output = Result<(), Error>>
fn sync(&mut self) -> impl Future<Output = Result<(), Error>>
Durably persist the journal and write all data, guaranteeing no recovery will be required on startup.
This provides a stronger guarantee than Self::commit but may be slower.
Sourcefn close(self) -> impl Future<Output = Result<(), Error>>
fn close(self) -> impl Future<Output = Result<(), Error>>
Close the journal, syncing all pending writes and releasing resources.
Sourcefn destroy(self) -> impl Future<Output = Result<(), Error>>
fn destroy(self) -> impl Future<Output = Result<(), Error>>
Destroy the journal, removing all associated storage.
This method consumes the journal and deletes all persisted data including blobs, metadata, and any other storage artifacts. Use this for cleanup in tests or when permanently removing a journal.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.