[][src]Trait cqrs::SnapshotSink

pub trait SnapshotSink<A> where
    A: Aggregate
{ type Error: CqrsError; fn persist_snapshot<I>(
        &self,
        id: &I,
        aggregate: &A,
        version: Version,
        last_snapshot_version: Option<Version>
    ) -> Result<Version, Self::Error>
    where
        I: AggregateId<A>
; }

A sink for writing/persisting snapshots of aggregates.

Associated Types

type Error: CqrsError

The error type.

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>, 

Writes an aggregate with its version to the sink. Returns the version number of the latest snapshot.

Loading content...

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]

type Error = SS::Error

impl<A> SnapshotSink<A> for NullSnapshotStore<A> where
    A: Aggregate
[src]

type Error = Void

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]

type Error = <SS as SnapshotSink<A>>::Error

impl<A, Hasher> SnapshotSink<A> for StateStore<A, Hasher> where
    A: Aggregate + Clone,
    Hasher: BuildHasher
[src]

type Error = Void

Loading content...