[][src]Trait cqrs::SnapshotSource

pub trait SnapshotSource<A> where
    A: Aggregate
{ type Error: CqrsError; fn get_snapshot<I>(
        &self,
        id: &I
    ) -> Result<Option<VersionedAggregate<A>>, Self::Error>
    where
        I: AggregateId<A>
; }

A source for reading/loading snapshots of aggregates.

Associated Types

type Error: CqrsError

The error type.

Loading content...

Required methods

fn get_snapshot<I>(
    &self,
    id: &I
) -> Result<Option<VersionedAggregate<A>>, Self::Error> where
    I: AggregateId<A>, 

Loads a versioned aggregate from the snapshot source.

Loading content...

Implementors

impl<'e, 's, A, E, ES, SS> SnapshotSource<A> for CompositeEntitySource<'e, 's, A, E, ES, SS> where
    A: Aggregate,
    E: AggregateEvent<A>,
    ES: EventSource<A, E> + 'e,
    SS: SnapshotSource<A> + 's, 
[src]

type Error = SS::Error

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

type Error = Void

impl<A, E, M, ES, SS> SnapshotSource<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 = <ES as SnapshotSource<A>>::Error

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

type Error = Void

Loading content...