pub struct MemorySnapshotStore<S> { /* private fields */ }Expand description
In-memory latest-snapshot persistence.
Implementations§
Source§impl<S> MemorySnapshotStore<S>
impl<S> MemorySnapshotStore<S>
Trait Implementations§
Source§impl<S: Debug> Debug for MemorySnapshotStore<S>
impl<S: Debug> Debug for MemorySnapshotStore<S>
Source§impl<S: Default> Default for MemorySnapshotStore<S>
impl<S: Default> Default for MemorySnapshotStore<S>
Source§fn default() -> MemorySnapshotStore<S>
fn default() -> MemorySnapshotStore<S>
Returns the “default value” for a type. Read more
Source§impl<S> SnapshotStore<S> for MemorySnapshotStore<S>
impl<S> SnapshotStore<S> for MemorySnapshotStore<S>
Source§fn load_latest<'a>(
&'a self,
stream_id: &'a StreamId,
) -> BoxFuture<'a, SoapResult<Option<Snapshot<S>>>>
fn load_latest<'a>( &'a self, stream_id: &'a StreamId, ) -> BoxFuture<'a, SoapResult<Option<Snapshot<S>>>>
Loads the newest snapshot for a stream.
Source§fn save(&self, snapshot: Snapshot<S>) -> BoxFuture<'_, SoapResult<()>>
fn save(&self, snapshot: Snapshot<S>) -> BoxFuture<'_, SoapResult<()>>
Stores a snapshot. Implementations must not replace a newer snapshot
with an older stream version.
Source§fn prune<'a>(
&'a self,
stream_id: &'a StreamId,
retain_from: StreamVersion,
) -> BoxFuture<'a, SoapResult<u64>>
fn prune<'a>( &'a self, stream_id: &'a StreamId, retain_from: StreamVersion, ) -> BoxFuture<'a, SoapResult<u64>>
Deletes snapshots strictly older than a retained version.
Auto Trait Implementations§
impl<S> !Freeze for MemorySnapshotStore<S>
impl<S> RefUnwindSafe for MemorySnapshotStore<S>
impl<S> Send for MemorySnapshotStore<S>where
S: Send,
impl<S> Sync for MemorySnapshotStore<S>where
S: Send,
impl<S> Unpin for MemorySnapshotStore<S>where
S: Unpin,
impl<S> UnsafeUnpin for MemorySnapshotStore<S>
impl<S> UnwindSafe for MemorySnapshotStore<S>
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