pub struct FixedClock(/* private fields */);Expand description
Test clock — always returns the same instant.
Implementations§
Source§impl FixedClock
impl FixedClock
Sourcepub const fn new(instant: SystemTime) -> Self
pub const fn new(instant: SystemTime) -> Self
Construct a fixed clock that always returns instant.
Trait Implementations§
Source§impl Clock for FixedClock
impl Clock for FixedClock
fn now(&self) -> SystemTime
Auto Trait Implementations§
impl Freeze for FixedClock
impl RefUnwindSafe for FixedClock
impl Send for FixedClock
impl Sync for FixedClock
impl Unpin for FixedClock
impl UnsafeUnpin for FixedClock
impl UnwindSafe for FixedClock
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