pub struct EventListBuilder<E> { /* private fields */ }Expand description
A utility for creating a sequence of events
Implementations§
Source§impl<E: Debug> EventListBuilder<E>
impl<E: Debug> EventListBuilder<E>
pub fn new() -> Self
pub fn add_event(self, payload: E, created_at: Option<DateTime<Utc>>) -> Self
pub fn user_id(self, user_id: &str) -> Self
pub fn build<A: Aggregate<E> + Debug>(self, aggregate: &A) -> Vec<Event<E>>
pub fn build_new(self, aggregate_id: Uuid) -> Vec<Event<E>>
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for EventListBuilder<E>
impl<E> RefUnwindSafe for EventListBuilder<E>where
E: RefUnwindSafe,
impl<E> Send for EventListBuilder<E>where
E: Send,
impl<E> Sync for EventListBuilder<E>where
E: Sync,
impl<E> Unpin for EventListBuilder<E>where
E: Unpin,
impl<E> UnwindSafe for EventListBuilder<E>where
E: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more