pub struct AsyncTestHarness;Expand description
A test harness for async operations with controllable time
Implementations§
Source§impl AsyncTestHarness
impl AsyncTestHarness
Sourcepub fn execute_command<M: Message + Clone + Send + 'static>(
&self,
cmd: Cmd<M>,
) -> Vec<M>
pub fn execute_command<M: Message + Clone + Send + 'static>( &self, cmd: Cmd<M>, ) -> Vec<M>
Execute a command and collect all messages it produces
Sourcepub fn execute_tick_now<M: Message, F>(&self, _duration: Duration, f: F) -> Mwhere
F: FnOnce() -> M,
pub fn execute_tick_now<M: Message, F>(&self, _duration: Duration, f: F) -> Mwhere
F: FnOnce() -> M,
Execute a tick command immediately (for testing)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AsyncTestHarness
impl RefUnwindSafe for AsyncTestHarness
impl Send for AsyncTestHarness
impl Sync for AsyncTestHarness
impl Unpin for AsyncTestHarness
impl UnwindSafe for AsyncTestHarness
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
Source§impl<T> Inspectable for T
impl<T> Inspectable for T
Source§fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
Conditionally inspect this value
Source§fn inspect_with<F>(self, label: &str, f: F) -> Self
fn inspect_with<F>(self, label: &str, f: F) -> Self
Inspect with a custom formatter