pub struct FileSnapshotStore { /* private fields */ }Expand description
Filesystem-based SnapshotStore with atomic write semantics.
Snapshots are serialized as JSON files. Each write first goes to a .tmp
file and is then atomically renamed to the final path, preventing partial
snapshots from being visible to concurrent readers.
Implementations§
Trait Implementations§
Source§impl SnapshotStore for FileSnapshotStore
impl SnapshotStore for FileSnapshotStore
Source§fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: &'life1 Snapshot,
) -> Pin<Box<dyn Future<Output = RuntimeResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: &'life1 Snapshot,
) -> Pin<Box<dyn Future<Output = RuntimeResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Saves a snapshot. Read more
Source§fn load<'life0, 'async_trait>(
&'life0 self,
run_id: RunId,
) -> Pin<Box<dyn Future<Output = RuntimeResult<Option<Snapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 self,
run_id: RunId,
) -> Pin<Box<dyn Future<Output = RuntimeResult<Option<Snapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads a snapshot by run ID. Read more
Auto Trait Implementations§
impl Freeze for FileSnapshotStore
impl RefUnwindSafe for FileSnapshotStore
impl Send for FileSnapshotStore
impl Sync for FileSnapshotStore
impl Unpin for FileSnapshotStore
impl UnsafeUnpin for FileSnapshotStore
impl UnwindSafe for FileSnapshotStore
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