pub struct RecordingTrace { /* private fields */ }Expand description
An in-memory TracePort that records every event for later inspection.
Thread-safe via Arc<Mutex<…>> so it can be cloned and shared across
threads in test assertions.
Implementations§
Source§impl RecordingTrace
impl RecordingTrace
Sourcepub fn events(&self) -> Vec<TraceEvent>
pub fn events(&self) -> Vec<TraceEvent>
Return a snapshot of all recorded events in arrival order.
Trait Implementations§
Source§impl Clone for RecordingTrace
impl Clone for RecordingTrace
Source§fn clone(&self) -> RecordingTrace
fn clone(&self) -> RecordingTrace
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 moreSource§impl Debug for RecordingTrace
impl Debug for RecordingTrace
Source§impl Default for RecordingTrace
impl Default for RecordingTrace
Source§fn default() -> RecordingTrace
fn default() -> RecordingTrace
Returns the “default value” for a type. Read more
Source§impl TracePort for RecordingTrace
impl TracePort for RecordingTrace
Source§fn task_registered(&self, event: TaskRegistered)
fn task_registered(&self, event: TaskRegistered)
Called once when a task is accepted into the system.
Source§fn task_completed(&self, event: TaskCompleted)
fn task_completed(&self, event: TaskCompleted)
Called once when a task run concludes successfully.
Source§fn task_failed(&self, event: TaskFailed)
fn task_failed(&self, event: TaskFailed)
Called once when a task run concludes with a failure.
Auto Trait Implementations§
impl Freeze for RecordingTrace
impl RefUnwindSafe for RecordingTrace
impl Send for RecordingTrace
impl Sync for RecordingTrace
impl Unpin for RecordingTrace
impl UnsafeUnpin for RecordingTrace
impl UnwindSafe for RecordingTrace
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