[−][src]Trait cqrs::SnapshotSink
A sink for writing/persisting snapshots of aggregates.
Associated Types
Loading content...Required methods
fn persist_snapshot<I>(
&self,
id: &I,
aggregate: &A,
version: Version,
last_snapshot_version: Option<Version>
) -> Result<Version, Self::Error> where
I: AggregateId<A>,
&self,
id: &I,
aggregate: &A,
version: Version,
last_snapshot_version: Option<Version>
) -> Result<Version, Self::Error> where
I: AggregateId<A>,
Writes an aggregate with its version to the sink. Returns the version number of the latest snapshot.
Implementors
impl<'e, 's, A, E, M, ES, SS> SnapshotSink<A> for CompositeEntitySink<'e, 's, A, E, M, ES, SS> where
A: Aggregate,
E: AggregateEvent<A>,
ES: EventSink<A, E, M> + 'e,
SS: SnapshotSink<A> + 's,
[src]
A: Aggregate,
E: AggregateEvent<A>,
ES: EventSink<A, E, M> + 'e,
SS: SnapshotSink<A> + 's,
type Error = SS::Error
fn persist_snapshot<I>(
&self,
id: &I,
aggregate: &A,
version: Version,
last_snapshot_version: Option<Version>
) -> Result<Version, Self::Error> where
I: AggregateId<A>,
[src]
&self,
id: &I,
aggregate: &A,
version: Version,
last_snapshot_version: Option<Version>
) -> Result<Version, Self::Error> where
I: AggregateId<A>,
impl<A> SnapshotSink<A> for NullSnapshotStore<A> where
A: Aggregate,
[src]
A: Aggregate,
type Error = Void
fn persist_snapshot<I>(
&self,
_id: &I,
_aggregate: &A,
_version: Version,
last_snapshot_version: Option<Version>
) -> Result<Version, Self::Error> where
I: AggregateId<A>,
Self: Sized,
[src]
&self,
_id: &I,
_aggregate: &A,
_version: Version,
last_snapshot_version: Option<Version>
) -> Result<Version, Self::Error> where
I: AggregateId<A>,
Self: Sized,
impl<A, E, M, ES, SS> SnapshotSink<A> for CompositeEntityStore<A, E, M, ES, SS> where
A: Aggregate,
E: AggregateEvent<A>,
ES: EntitySource<A, E>,
SS: EntitySink<A, E, M>,
[src]
A: Aggregate,
E: AggregateEvent<A>,
ES: EntitySource<A, E>,
SS: EntitySink<A, E, M>,
type Error = <SS as SnapshotSink<A>>::Error
fn persist_snapshot<I>(
&self,
id: &I,
aggregate: &A,
version: Version,
last_snapshot_version: Option<Version>
) -> Result<Version, Self::Error> where
I: AggregateId<A>,
[src]
&self,
id: &I,
aggregate: &A,
version: Version,
last_snapshot_version: Option<Version>
) -> Result<Version, Self::Error> where
I: AggregateId<A>,
impl<A, Hasher> SnapshotSink<A> for StateStore<A, Hasher> where
A: Aggregate + Clone,
Hasher: BuildHasher,
[src]
A: Aggregate + Clone,
Hasher: BuildHasher,