[−][src]Struct eventmill::event::DomainEvent
Fields
aggregate_id: AggregateIdOf<A>
sequence: Sequence
time: DateTime<Utc>
data: E
metadata: Metadata
Implementations
impl<E, A> DomainEvent<E, A> where
A: WithAggregateId,
[src]
A: WithAggregateId,
pub fn new(
aggregate_id: impl Into<AggregateIdOf<A>>,
sequence: Sequence,
time: DateTime<Utc>,
data: impl Into<E>
) -> Self
[src]
aggregate_id: impl Into<AggregateIdOf<A>>,
sequence: Sequence,
time: DateTime<Utc>,
data: impl Into<E>
) -> Self
pub fn new_now(
aggregate_id: impl Into<AggregateIdOf<A>>,
sequence: Sequence,
data: impl Into<E>
) -> Self
[src]
aggregate_id: impl Into<AggregateIdOf<A>>,
sequence: Sequence,
data: impl Into<E>
) -> Self
pub fn with_metadata<M>(self, metadata: M) -> Self where
M: IntoIterator<Item = (Key, Value)>,
[src]
M: IntoIterator<Item = (Key, Value)>,
pub fn unwrap(self) -> (E, Metadata)
[src]
pub fn as_view(&self) -> DomainEventView<E, A>
[src]
pub fn aggregate_id(&self) -> &AggregateIdOf<A>
[src]
pub fn sequence(&self) -> Sequence
[src]
pub fn time(&self) -> DateTime<Utc>
[src]
pub fn data(&self) -> &E
[src]
pub fn metadata(&self) -> &Metadata
[src]
impl<E, A> DomainEvent<E, A> where
A: AggregateType + WithAggregateId,
[src]
A: AggregateType + WithAggregateId,
pub fn aggregate_type(&self) -> &str
[src]
Trait Implementations
impl<E, A> Clone for DomainEvent<E, A> where
E: Clone,
A: WithAggregateId,
[src]
E: Clone,
A: WithAggregateId,
implement Clone without requiring type parameter A to implement Clone
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<E: Debug, A: Debug> Debug for DomainEvent<E, A> where
A: WithAggregateId,
[src]
A: WithAggregateId,
impl<'de, E, A> Deserialize<'de> for DomainEvent<E, A> where
A: WithAggregateId,
E: Deserialize<'de>,
A: Deserialize<'de>,
[src]
A: WithAggregateId,
E: Deserialize<'de>,
A: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<E, A> PartialEq<DomainEvent<E, A>> for DomainEvent<E, A> where
E: PartialEq,
A: WithAggregateId,
[src]
E: PartialEq,
A: WithAggregateId,
implement PartialEq without requiring type parameter A to implement PartialEq
impl<E, A> Serialize for DomainEvent<E, A> where
A: WithAggregateId,
E: Serialize,
A: Serialize,
[src]
A: WithAggregateId,
E: Serialize,
A: Serialize,
Auto Trait Implementations
impl<E, A> RefUnwindSafe for DomainEvent<E, A> where
E: RefUnwindSafe,
<A as WithAggregateId>::Id: RefUnwindSafe,
E: RefUnwindSafe,
<A as WithAggregateId>::Id: RefUnwindSafe,
impl<E, A> Send for DomainEvent<E, A> where
E: Send,
<A as WithAggregateId>::Id: Send,
E: Send,
<A as WithAggregateId>::Id: Send,
impl<E, A> Sync for DomainEvent<E, A> where
E: Sync,
<A as WithAggregateId>::Id: Sync,
E: Sync,
<A as WithAggregateId>::Id: Sync,
impl<E, A> Unpin for DomainEvent<E, A> where
E: Unpin,
<A as WithAggregateId>::Id: Unpin,
E: Unpin,
<A as WithAggregateId>::Id: Unpin,
impl<E, A> UnwindSafe for DomainEvent<E, A> where
E: UnwindSafe,
<A as WithAggregateId>::Id: UnwindSafe,
E: UnwindSafe,
<A as WithAggregateId>::Id: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,