pub struct ManualClock(/* private fields */);Expand description
A clock whose reading is whatever the caller last set.
This is not a simulator and must not grow into one by accident: it does not advance itself, it has no notion of a pending timer, and nothing schedules against it. It exists so that a test can assert a program’s behaviour at a stated instant, and so that the seam has a second implementation — a seam with one implementation is an abstraction nobody has checked.
Implementations§
Trait Implementations§
Source§impl Clock for ManualClock
impl Clock for ManualClock
Auto Trait Implementations§
impl !Freeze for ManualClock
impl RefUnwindSafe for ManualClock
impl Send for ManualClock
impl Sync for ManualClock
impl Unpin for ManualClock
impl UnwindSafe for ManualClock
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