[][src]Struct eventmill::command::DomainCommand

pub struct DomainCommand<C, A> where
    A: WithAggregateId
{ pub aggregate_id: AggregateIdOf<A>, pub aggregate_generation: Generation, pub data: C, }

Fields

aggregate_id: AggregateIdOf<A>aggregate_generation: Generationdata: C

Implementations

impl<C, A> DomainCommand<C, A> where
    A: WithAggregateId
[src]

pub fn new(
    aggregate_id: AggregateIdOf<A>,
    aggregate_generation: impl Into<Generation>,
    data: impl Into<C>
) -> Self
[src]

Trait Implementations

impl<C: Clone, A: Clone> Clone for DomainCommand<C, A> where
    A: WithAggregateId
[src]

impl<C: Debug, A: Debug> Debug for DomainCommand<C, A> where
    A: WithAggregateId
[src]

impl<'de, C, A> Deserialize<'de> for DomainCommand<C, A> where
    A: WithAggregateId,
    C: Deserialize<'de>,
    A: Deserialize<'de>, 
[src]

impl<C, A, S> DispatchCommand<DomainCommand<C, A>, A> for Core<S> where
    A: Aggregate<<A as HandleCommand<C, A>>::Event> + AggregateType + WithAggregateId + HandleCommand<C, A> + InitializeAggregate<State = A>,
    <A as HandleCommand<C, A>>::Event: 'static + EventType,
    S: EventSource<<VersionedAggregate<A> as HandleCommand<C, VersionedAggregate<A>>>::Event, VersionedAggregate<A>> + EventSink<<VersionedAggregate<A> as HandleCommand<C, VersionedAggregate<A>>>::Event, VersionedAggregate<A>>, 
[src]

type Context = <A as HandleCommand<C, A>>::Context

type Output = VersionedAggregate<A>

type Error = CoreDispatchError<S, C, A>

impl<'_, C, A> From<(C, &'_ VersionedAggregate<A>)> for DomainCommand<C, A> where
    A: WithAggregateId
[src]

impl<C: PartialEq, A: PartialEq> PartialEq<DomainCommand<C, A>> for DomainCommand<C, A> where
    A: WithAggregateId
[src]

impl<C, A> Serialize for DomainCommand<C, A> where
    A: WithAggregateId,
    C: Serialize,
    A: Serialize
[src]

impl<C, A> StructuralPartialEq for DomainCommand<C, A> where
    A: WithAggregateId
[src]

Auto Trait Implementations

impl<C, A> RefUnwindSafe for DomainCommand<C, A> where
    C: RefUnwindSafe,
    <A as WithAggregateId>::Id: RefUnwindSafe

impl<C, A> Send for DomainCommand<C, A> where
    C: Send,
    <A as WithAggregateId>::Id: Send

impl<C, A> Sync for DomainCommand<C, A> where
    C: Sync,
    <A as WithAggregateId>::Id: Sync

impl<C, A> Unpin for DomainCommand<C, A> where
    C: Unpin,
    <A as WithAggregateId>::Id: Unpin

impl<C, A> UnwindSafe for DomainCommand<C, A> where
    C: UnwindSafe,
    <A as WithAggregateId>::Id: 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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.