pub struct FixedClock { /* private fields */ }Expand description
Test-only clock that returns a fixed value.
Useful for deterministic evaluation harnesses (e.g. the wasm
platform adapter’s evaluate_at_time() helper and the
portable_build.rs integration test).
Implementations§
Trait Implementations§
Source§impl Clock for FixedClock
impl Clock for FixedClock
Source§fn now_unix_secs(&self) -> u64
fn now_unix_secs(&self) -> u64
Current Unix timestamp in seconds.
Source§impl Clone for FixedClock
impl Clone for FixedClock
Source§fn clone(&self) -> FixedClock
fn clone(&self) -> FixedClock
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FixedClock
impl Debug for FixedClock
impl Copy for FixedClock
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