pub struct EventDraft { /* private fields */ }Expand description
A not-yet-sequenced event: everything about a RunEvent except the
fields only the journal can assign (id, run_id, thread_id, seq,
recorded_at). Build via EventDraft::new plus the builder methods,
then hand to Journal::record.
Implementations§
Source§impl EventDraft
impl EventDraft
Sourcepub fn new(kind: RunEventKind, effect: Effect) -> Self
pub fn new(kind: RunEventKind, effect: Effect) -> Self
A draft of kind kind produced by an effect of class effect.
Sourcepub fn input(self, value: Value) -> Self
pub fn input(self, value: Value) -> Self
The input payload. Large values are content-addressed by the journal
at record time (see INLINE_PAYLOAD_MAX_BYTES).
Sourcepub fn output(self, value: Value) -> Self
pub fn output(self, value: Value) -> Self
The output payload; same large-value handling as EventDraft::input.
Sourcepub fn latency_ms(self, latency_ms: u64) -> Self
pub fn latency_ms(self, latency_ms: u64) -> Self
The measured latency of the recorded operation, in milliseconds.
Sourcepub fn status(self, status: EventStatus) -> Self
pub fn status(self, status: EventStatus) -> Self
The outcome status (defaults to EventStatus::Ok).
Trait Implementations§
Source§impl Clone for EventDraft
impl Clone for EventDraft
Source§fn clone(&self) -> EventDraft
fn clone(&self) -> EventDraft
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EventDraft
impl RefUnwindSafe for EventDraft
impl Send for EventDraft
impl Sync for EventDraft
impl Unpin for EventDraft
impl UnsafeUnpin for EventDraft
impl UnwindSafe for EventDraft
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