[][src]Struct cqrs::memory::EventStore

pub struct EventStore<A, E, M, Hasher = RandomState> where
    A: Aggregate,
    E: AggregateEvent<A> + Clone,
    Hasher: BuildHasher
{ /* fields omitted */ }

An in-memory event store

Methods

impl<A, E, M, Hasher> EventStore<A, E, M, Hasher> where
    A: Aggregate,
    E: AggregateEvent<A> + Clone,
    Hasher: BuildHasher
[src]

pub fn with_hasher(hasher: Hasher) -> Self[src]

Constructs a new event store with the specified hasher.

Trait Implementations

impl<A, E, M, Hasher> Default for EventStore<A, E, M, Hasher> where
    A: Aggregate,
    E: AggregateEvent<A> + Clone,
    Hasher: BuildHasher + Default
[src]

impl<A: Debug, E: Debug, M: Debug, Hasher: Debug> Debug for EventStore<A, E, M, Hasher> where
    A: Aggregate,
    E: AggregateEvent<A> + Clone,
    Hasher: BuildHasher
[src]

impl<A, E, M, Hasher> EventSource<A, E> for EventStore<A, E, M, Hasher> where
    A: Aggregate,
    E: AggregateEvent<A> + Clone,
    Hasher: BuildHasher
[src]

type Error = Void

The error type.

type Events = Vec<VersionedEvent<E>>

Represents the sequence of events read from the event source.

impl<A, E, M, Hasher> EventSink<A, E, M> for EventStore<A, E, M, Hasher> where
    A: Aggregate,
    E: AggregateEvent<A> + Clone,
    Hasher: BuildHasher
[src]

type Error = PreconditionFailed

The error type.

Auto Trait Implementations

impl<A, E, M, Hasher = RandomState> !Sync for EventStore<A, E, M, Hasher>

impl<A, E, M, Hasher> Unpin for EventStore<A, E, M, Hasher> where
    A: Unpin,
    E: Unpin,
    Hasher: Unpin

impl<A, E, M, Hasher = RandomState> !Send for EventStore<A, E, M, Hasher>

impl<A, E, M, Hasher> UnwindSafe for EventStore<A, E, M, Hasher> where
    A: RefUnwindSafe,
    E: UnwindSafe,
    Hasher: UnwindSafe,
    M: RefUnwindSafe

impl<A, E, M, Hasher = RandomState> !RefUnwindSafe for EventStore<A, E, M, Hasher>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]