pub struct FixedWallClock { /* private fields */ }Expand description
A wall clock that always returns one fixed time.
Implementations§
Source§impl FixedWallClock
impl FixedWallClock
Sourcepub const fn new(fixed_time: SystemTime) -> Self
pub const fn new(fixed_time: SystemTime) -> Self
Sourcepub const fn fixed_time(&self) -> SystemTime
pub const fn fixed_time(&self) -> SystemTime
Trait Implementations§
Source§impl Clone for FixedWallClock
impl Clone for FixedWallClock
Source§fn clone(&self) -> FixedWallClock
fn clone(&self) -> FixedWallClock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FixedWallClock
Source§impl Debug for FixedWallClock
impl Debug for FixedWallClock
impl Eq for FixedWallClock
Source§impl PartialEq for FixedWallClock
impl PartialEq for FixedWallClock
impl StructuralPartialEq for FixedWallClock
Source§impl WallClock for FixedWallClock
impl WallClock for FixedWallClock
Source§fn now(&self) -> SystemTime
fn now(&self) -> SystemTime
Auto Trait Implementations§
impl Freeze for FixedWallClock
impl RefUnwindSafe for FixedWallClock
impl Send for FixedWallClock
impl Sync for FixedWallClock
impl Unpin for FixedWallClock
impl UnsafeUnpin for FixedWallClock
impl UnwindSafe for FixedWallClock
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