Struct cqrs_eventsourcing::FileEventStore[][src]

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

FileEventStore

NOTE: Only use the for develpment and not for production

Implementations

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

pub fn new(path: &str) -> FileEventStore<A, E>[src]

pub fn create_cqrs(
    path: &str,
    handlers: Handlers<A, E>
) -> CQRS<A, E, FileEventStore<A, E>>
[src]

Creates CQRS with store

pub fn get_file(&self) -> Result<File, Error>[src]

Get store file from device

Trait Implementations

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

impl<A: Aggregate, E: DomainEvent<A>> Store<A, E> for FileEventStore<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 FileEventStore<A, E> where
    A: RefUnwindSafe,
    E: RefUnwindSafe

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

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

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

impl<A, E> UnwindSafe for FileEventStore<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.