[][src]Struct eventmill::event::NewEvent

pub struct NewEvent<E, A> where
    A: WithAggregateId
{ pub aggregate_id: AggregateIdOf<A>, pub data: E, }

Fields

aggregate_id: AggregateIdOf<A>data: E

Implementations

impl<E, A> NewEvent<E, A> where
    A: WithAggregateId
[src]

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

pub fn unwrap(self) -> (AggregateIdOf<A>, E)[src]

pub fn aggregate_id(&self) -> &AggregateIdOf<A>[src]

pub fn data(&self) -> &E[src]

Trait Implementations

impl<E, A> Clone for NewEvent<E, A> where
    E: Clone,
    A: WithAggregateId
[src]

implement Clone without requiring type parameter A to implement Clone

impl<E: Debug, A: Debug> Debug for NewEvent<E, A> where
    A: WithAggregateId
[src]

impl<'de, E, A> Deserialize<'de> for NewEvent<E, A> where
    A: WithAggregateId,
    E: Deserialize<'de>,
    A: Deserialize<'de>, 
[src]

impl<E, A> From<(<A as WithAggregateId>::Id, E)> for NewEvent<E, A> where
    A: WithAggregateId
[src]

impl<E, A> PartialEq<NewEvent<E, A>> for NewEvent<E, A> where
    E: PartialEq,
    A: WithAggregateId
[src]

implement PartialEq without requiring type parameter A to implement PartialEq

impl<E, A> Serialize for NewEvent<E, A> where
    A: WithAggregateId,
    E: Serialize,
    A: Serialize
[src]

Auto Trait Implementations

impl<E, A> RefUnwindSafe for NewEvent<E, A> where
    E: RefUnwindSafe,
    <A as WithAggregateId>::Id: RefUnwindSafe

impl<E, A> Send for NewEvent<E, A> where
    E: Send,
    <A as WithAggregateId>::Id: Send

impl<E, A> Sync for NewEvent<E, A> where
    E: Sync,
    <A as WithAggregateId>::Id: Sync

impl<E, A> Unpin for NewEvent<E, A> where
    E: Unpin,
    <A as WithAggregateId>::Id: Unpin

impl<E, A> UnwindSafe for NewEvent<E, A> where
    E: 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.