Struct cqrs_eventsourcing::TestStore[][src]

pub struct TestStore<A: Aggregate, E: DomainEvent<A>> { /* fields omitted */ }

TestStore

Implementations

impl<A: Aggregate, E: DomainEvent<A>> TestStore<A, E>[src]

pub fn new(given: Vec<E>) -> TestStore<A, E>[src]

Trait Implementations

impl<A: Aggregate, E: DomainEvent<A>> Clone for TestStore<A, E>[src]

impl<A: Aggregate, E: DomainEvent<A>> Store<A, E> for TestStore<A, E>[src]

fn assemble_aggregate<'life0, 'async_trait>(
    &'life0 self,
    id: Option<String>
) -> Pin<Box<dyn Future<Output = Result<AggregateContext<A>, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Rebuilding the aggregate

fn append<'life0, 'async_trait>(
    &'life0 self,
    events: Vec<E>,
    context: AggregateContext<A>,
    meta: MetaData
) -> Pin<Box<dyn Future<Output = FormatedResult<A, E>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Append formated events to store

fn retrieve<'life0, 'life1, 'async_trait>(
    &'life0 self,
    aggregate_id: &'life1 str
) -> Pin<Box<dyn Future<Output = FormatedResult<A, E>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Retrive Events for command store

fn retrieve_for_query<'life0, 'life1, 'async_trait>(
    &'life0 self,
    aggregate_id: Option<&'life1 str>
) -> Pin<Box<dyn Future<Output = FormatedResult<A, E>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Retrive Events for query

Auto Trait Implementations

impl<A, E> RefUnwindSafe for TestStore<A, E> where
    A: RefUnwindSafe,
    E: RefUnwindSafe

impl<A, E> Send for TestStore<A, E>

impl<A, E> Sync for TestStore<A, E>

impl<A, E> Unpin for TestStore<A, E> where
    A: Unpin,
    E: Unpin

impl<A, E> UnwindSafe for TestStore<A, E> where
    A: UnwindSafe,
    E: UnwindSafe

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.