pub struct SnapshotManager { /* private fields */ }Expand description
Manages snapshot creation and retrieval.
Implementations§
Source§impl SnapshotManager
impl SnapshotManager
Sourcepub fn with_config(config: SnapshotConfig) -> Self
pub fn with_config(config: SnapshotConfig) -> Self
Create a snapshot manager with custom configuration.
Sourcepub fn by_creator(&self, creator: &str) -> Vec<&Snapshot>
pub fn by_creator(&self, creator: &str) -> Vec<&Snapshot>
Get all snapshots by a specific creator.
Sourcepub fn find_covering(&self, vv: &VersionVector) -> Option<&Snapshot>
pub fn find_covering(&self, vv: &VersionVector) -> Option<&Snapshot>
Find the best snapshot that covers a given version vector.
Sourcepub fn should_snapshot(
&self,
current_vv: &VersionVector,
current_time: u64,
) -> bool
pub fn should_snapshot( &self, current_vv: &VersionVector, current_time: u64, ) -> bool
Check if a new snapshot should be created based on configuration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SnapshotManager
impl RefUnwindSafe for SnapshotManager
impl Send for SnapshotManager
impl Sync for SnapshotManager
impl Unpin for SnapshotManager
impl UnsafeUnpin for SnapshotManager
impl UnwindSafe for SnapshotManager
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