Struct omaha_client::time::timers::MockTimer
source · pub struct MockTimer { /* private fields */ }
Expand description
A mocked timer that will assert expected waits, and block forever after it has used them.
Implementations§
source§impl MockTimer
impl MockTimer
pub fn new() -> Self
sourcepub fn expect_until(&mut self, time: impl Into<PartialComplexTime>)
pub fn expect_until(&mut self, time: impl Into<PartialComplexTime>)
Expect a wait until the given PartialComplexTime.
sourcepub fn expect_for(&mut self, duration: Duration)
pub fn expect_for(&mut self, duration: Duration)
Expect a wait for the given Duration.
sourcepub fn expect_for_range(&mut self, min: Duration, max: Duration)
pub fn expect_for_range(&mut self, min: Duration, max: Duration)
Add a new wait to the end of the expected durations.
pub fn get_requested_waits_view(&self) -> Rc<RefCell<Vec<RequestedWait>>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MockTimer
impl !Send for MockTimer
impl !Sync for MockTimer
impl Unpin for MockTimer
impl !UnwindSafe for MockTimer
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