pub struct RunRecorder { /* private fields */ }Expand description
Cloneable event emitter bound to one run and a shared journal.
Implementations§
Source§impl RunRecorder
impl RunRecorder
Sourcepub fn new(
journal: Arc<dyn Journal>,
run_id: RunId,
parent_run_id: Option<RunId>,
) -> Self
pub fn new( journal: Arc<dyn Journal>, run_id: RunId, parent_run_id: Option<RunId>, ) -> Self
Creates a recorder for one run.
Sourcepub fn child(&self, run_id: RunId, parent_run_id: RunId) -> Self
pub fn child(&self, run_id: RunId, parent_run_id: RunId) -> Self
Creates a recorder for a child run using the same journal.
Sourcepub fn record(
&self,
kind: RunEventKind,
caused_by: Option<EventId>,
) -> Result<RunEvent, JournalError>
pub fn record( &self, kind: RunEventKind, caused_by: Option<EventId>, ) -> Result<RunEvent, JournalError>
Emits and records one immutable event.
§Errors
Returns JournalError when the journal rejects the event.
Trait Implementations§
Source§impl Clone for RunRecorder
impl Clone for RunRecorder
Source§fn clone(&self) -> RunRecorder
fn clone(&self) -> RunRecorder
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 !RefUnwindSafe for RunRecorder
impl !UnwindSafe for RunRecorder
impl Freeze for RunRecorder
impl Send for RunRecorder
impl Sync for RunRecorder
impl Unpin for RunRecorder
impl UnsafeUnpin for RunRecorder
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