pub struct StateStore<A, Hasher = RandomState>{ /* private fields */ }Expand description
An in-memory store for aggregate snapshots.
Implementations§
Source§impl<A, Hasher> StateStore<A, Hasher>
impl<A, Hasher> StateStore<A, Hasher>
Sourcepub fn with_hasher(hasher: Hasher) -> Self
pub fn with_hasher(hasher: Hasher) -> Self
Constructs a new snapshot store with a specific hasher.
Trait Implementations§
Source§impl<A, Hasher> Debug for StateStore<A, Hasher>
impl<A, Hasher> Debug for StateStore<A, Hasher>
Source§impl<A, Hasher> Default for StateStore<A, Hasher>
impl<A, Hasher> Default for StateStore<A, Hasher>
Source§impl<A, Hasher> SnapshotSink<A> for StateStore<A, Hasher>
impl<A, Hasher> SnapshotSink<A> for StateStore<A, Hasher>
Source§impl<A, Hasher> SnapshotSource<A> for StateStore<A, Hasher>
impl<A, Hasher> SnapshotSource<A> for StateStore<A, Hasher>
Source§fn get_snapshot<I>(
&self,
id: &I,
) -> Result<Option<VersionedAggregate<A>>, Self::Error>where
I: AggregateId<A>,
Self: Sized,
fn get_snapshot<I>(
&self,
id: &I,
) -> Result<Option<VersionedAggregate<A>>, Self::Error>where
I: AggregateId<A>,
Self: Sized,
Loads a versioned aggregate from the snapshot source.
Auto Trait Implementations§
impl<A, Hasher = RandomState> !Freeze for StateStore<A, Hasher>
impl<A, Hasher = RandomState> !RefUnwindSafe for StateStore<A, Hasher>
impl<A, Hasher> Send for StateStore<A, Hasher>
impl<A, Hasher> Sync for StateStore<A, Hasher>
impl<A, Hasher> Unpin for StateStore<A, Hasher>
impl<A, Hasher> UnwindSafe for StateStore<A, Hasher>where
A: UnwindSafe,
Hasher: UnwindSafe,
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