pub struct InstrumentedHandle { /* private fields */ }Expand description
Single control handle for the InstrumentedDriver test middleware.
Exposes both the operation log (for assertions) and the fault queue
(for injecting failures). Cheaply cloneable; every clone refers to
the same shared state.
Implementations§
Source§impl InstrumentedHandle
impl InstrumentedHandle
Sourcepub fn pop(&self) -> (Operation, ExecResponse)
pub fn pop(&self) -> (Operation, ExecResponse)
Remove and return the first operation from the log
pub fn pop_op(&self) -> Operation
Sourcepub fn inject_fault(&self, fault: Fault)
pub fn inject_fault(&self, fault: Fault)
Queue a fault to fire on the next driver exec call. Faults fire
in FIFO order across all connections produced by the driver.
Trait Implementations§
Source§impl Clone for InstrumentedHandle
impl Clone for InstrumentedHandle
Source§fn clone(&self) -> InstrumentedHandle
fn clone(&self) -> InstrumentedHandle
Returns a duplicate of the value. Read more
1.0.0 · 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 InstrumentedHandle
impl Debug for InstrumentedHandle
Source§impl Default for InstrumentedHandle
impl Default for InstrumentedHandle
Source§fn default() -> InstrumentedHandle
fn default() -> InstrumentedHandle
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InstrumentedHandle
impl RefUnwindSafe for InstrumentedHandle
impl Send for InstrumentedHandle
impl Sync for InstrumentedHandle
impl Unpin for InstrumentedHandle
impl UnsafeUnpin for InstrumentedHandle
impl UnwindSafe for InstrumentedHandle
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