pub struct Clock(/* private fields */);Expand description
The clock an App and its timers read the time from.
App::new runs on Clock::system. A test creates a
VirtualClock, hands it to App::with_clock
and advances its own copy, so timers fire at exact moments without the
test sleeping.
Implementations§
Trait Implementations§
Source§impl From<VirtualClock> for Clock
impl From<VirtualClock> for Clock
Source§fn from(clock: VirtualClock) -> Clock
fn from(clock: VirtualClock) -> Clock
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Clock
impl !Send for Clock
impl !Sync for Clock
impl !UnwindSafe for Clock
impl Forget for Clock
impl Freeze for Clock
impl Move for Clock
impl Unpin for Clock
impl UnsafeUnpin for Clock
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