pub struct EventBuilder { /* private fields */ }Expand description
Builder for events. Used by the verb dispatch path.
Implementations§
Source§impl EventBuilder
impl EventBuilder
pub fn new( verb: impl Into<String>, substrate: SubstrateKind, actor: impl Into<String>, ) -> Self
pub fn outcome(self, outcome: EventOutcome) -> Self
pub fn data(self, data: impl Into<String>) -> Self
pub fn duration_us(self, us: u64) -> Self
pub fn target_id(self, id: Id128) -> Self
pub fn build(self, header: Header) -> Event
Auto Trait Implementations§
impl Freeze for EventBuilder
impl RefUnwindSafe for EventBuilder
impl Send for EventBuilder
impl Sync for EventBuilder
impl Unpin for EventBuilder
impl UnsafeUnpin for EventBuilder
impl UnwindSafe for EventBuilder
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