[][src]Struct cqrs::CompositeEntitySource

pub struct CompositeEntitySource<'e, 's, A, E, ES, SS> where
    A: Aggregate,
    E: AggregateEvent<A>,
    ES: EventSource<A, E> + 'e,
    SS: SnapshotSource<A> + 's, 
{ /* fields omitted */ }

Combines an EventSource and a SnapshotSource of different types by reference so that they can be used jointly as an EntitySource.

Methods

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

pub fn with_event_source<'new_e, NewES>(
    self,
    event_source: &'new_e NewES
) -> CompositeEntitySource<'new_e, 's, A, E, NewES, SS> where
    NewES: EventSource<A, E> + 'new_e, 
[src]

Attaches a specific event source.

pub fn with_snapshot_source<'new_s, NewSS>(
    self,
    snapshot_source: &'new_s NewSS
) -> CompositeEntitySource<'e, 'new_s, A, E, ES, NewSS> where
    NewSS: SnapshotSource<A> + 'new_s, 
[src]

Attaches a specific snapshot source.

Trait Implementations

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

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<A, E> Default for CompositeEntitySource<'static, 'static, A, E, NullEventStore<A, E>, NullSnapshotStore<A>> where
    A: Aggregate,
    E: AggregateEvent<A>, 
[src]

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

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

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

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

impl<'e, 's, A, E, ES, SS> EventSource<A, E> 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 = ES::Error

The error type.

type Events = ES::Events

Represents the sequence of events read from the event source.

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

The error type.

Auto Trait Implementations

impl<'e, 's, A, E, ES, SS> Sync for CompositeEntitySource<'e, 's, A, E, ES, SS> where
    A: Sync,
    E: Sync,
    ES: Sync,
    SS: Sync

impl<'e, 's, A, E, ES, SS> Send for CompositeEntitySource<'e, 's, A, E, ES, SS> where
    A: Sync,
    E: Sync,
    ES: Sync,
    SS: Sync

impl<'e, 's, A, E, ES, SS> Unpin for CompositeEntitySource<'e, 's, A, E, ES, SS>

impl<'e, 's, A, E, ES, SS> RefUnwindSafe for CompositeEntitySource<'e, 's, A, E, ES, SS> where
    A: RefUnwindSafe,
    E: RefUnwindSafe,
    ES: RefUnwindSafe,
    SS: RefUnwindSafe

impl<'e, 's, A, E, ES, SS> UnwindSafe for CompositeEntitySource<'e, 's, A, E, ES, SS> where
    A: RefUnwindSafe,
    E: RefUnwindSafe,
    ES: RefUnwindSafe,
    SS: RefUnwindSafe

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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