pub struct SnapshotStore<T: Clone> { /* private fields */ }Implementations§
Source§impl<T: Clone> SnapshotStore<T>
impl<T: Clone> SnapshotStore<T>
pub fn new(initial: T) -> Self
pub fn write(&self, data: T) -> u64
pub fn read_current(&self) -> T
pub fn read_at_version(&self, version: u64) -> Option<T>
pub fn current_version(&self) -> u64
pub fn snapshot_count(&self) -> usize
pub fn prune_older_than(&self, max_versions: usize) -> usize
Auto Trait Implementations§
impl<T> !Freeze for SnapshotStore<T>
impl<T> RefUnwindSafe for SnapshotStore<T>
impl<T> Send for SnapshotStore<T>where
T: Send,
impl<T> Sync for SnapshotStore<T>where
T: Send,
impl<T> Unpin for SnapshotStore<T>where
T: Unpin,
impl<T> UnsafeUnpin for SnapshotStore<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for SnapshotStore<T>
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