pub struct TestDispatcher { /* private fields */ }Expand description
A host that records what it was asked for and never wakes the app. The test pumps the app
instead, where a host would call EmbedderClient::wake, and work runs at once on the
calling thread, so a test needs only a checkpoint to see its result.
Implementations§
Source§impl TestDispatcher
impl TestDispatcher
Sourcepub fn timer_wakeups(&self) -> Vec<Option<Instant>>
pub fn timer_wakeups(&self) -> Vec<Option<Instant>>
The timer wakeups set, in order. A None is the application saying no timer is
waiting.
Sourcepub fn wake_now_requests(&self) -> usize
pub fn wake_now_requests(&self) -> usize
How often a ready task has asked the host to wake the app.
Trait Implementations§
Source§impl Default for TestDispatcher
impl Default for TestDispatcher
Auto Trait Implementations§
impl !Freeze for TestDispatcher
impl Forget for TestDispatcher
impl Move for TestDispatcher
impl RefUnwindSafe for TestDispatcherwhere
Mutex<Vec<Option<Instant>>>: RefUnwindSafe,
Mutex<usize>: RefUnwindSafe,
Condvar: RefUnwindSafe,
impl Send for TestDispatcher
impl Sync for TestDispatcher
impl Unpin for TestDispatcher
impl UnsafeUnpin for TestDispatcherwhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Option<Instant>>: UnsafeUnpin,
impl UnwindSafe for TestDispatcher
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