pub struct FileSystemPersistence { /* private fields */ }Expand description
Simple file-based persistence implementation.
This implementation stores the state in a single file on disk. It provides persistent storage that survives process restarts.
Implementations§
Source§impl FileSystemPersistence
impl FileSystemPersistence
Sourcepub fn new_sync<P: AsRef<Path>>(data_dir: P) -> Result<Self>
pub fn new_sync<P: AsRef<Path>>(data_dir: P) -> Result<Self>
Create a new file-based persistence instance (synchronous).
This is a convenience method that blocks on the async new method.
§Arguments
data_dir- Directory path where the state file will be stored
§Returns
- A new
FileSystemPersistenceinstance
§Errors
- Returns error if the data directory cannot be created
Trait Implementations§
Source§impl Clone for FileSystemPersistence
impl Clone for FileSystemPersistence
Source§fn clone(&self) -> FileSystemPersistence
fn clone(&self) -> FileSystemPersistence
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileSystemPersistence
impl Debug for FileSystemPersistence
Source§impl PersistenceLayer for FileSystemPersistence
impl PersistenceLayer for FileSystemPersistence
Auto Trait Implementations§
impl Freeze for FileSystemPersistence
impl RefUnwindSafe for FileSystemPersistence
impl Send for FileSystemPersistence
impl Sync for FileSystemPersistence
impl Unpin for FileSystemPersistence
impl UnsafeUnpin for FileSystemPersistence
impl UnwindSafe for FileSystemPersistence
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more