pub enum MockClockProgression {
Frozen,
Monotonic,
}Expand description
Controls whether a mock clock stays frozen or progresses with monotonic time.
Frozen is the default because deterministic
tests usually need the clock to change only when explicitly advanced.
Monotonic keeps the current logical
reading anchored to an internal monotonic time source, so subsequent reads
naturally progress.
Variants§
Frozen
Keep the logical time frozen until explicitly advanced.
Monotonic
Progress the logical time using an internal monotonic time source.
Implementations§
Source§impl MockClockProgression
impl MockClockProgression
Sourcepub const fn is_monotonic(self) -> bool
pub const fn is_monotonic(self) -> bool
Returns true when this mode uses monotonic progression.
Trait Implementations§
Source§impl Clone for MockClockProgression
impl Clone for MockClockProgression
Source§fn clone(&self) -> MockClockProgression
fn clone(&self) -> MockClockProgression
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 moreSource§impl Debug for MockClockProgression
impl Debug for MockClockProgression
Source§impl Default for MockClockProgression
impl Default for MockClockProgression
Source§fn default() -> MockClockProgression
fn default() -> MockClockProgression
Returns the “default value” for a type. Read more
Source§impl PartialEq for MockClockProgression
impl PartialEq for MockClockProgression
Source§fn eq(&self, other: &MockClockProgression) -> bool
fn eq(&self, other: &MockClockProgression) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for MockClockProgression
impl Eq for MockClockProgression
impl StructuralPartialEq for MockClockProgression
Auto Trait Implementations§
impl Freeze for MockClockProgression
impl RefUnwindSafe for MockClockProgression
impl Send for MockClockProgression
impl Sync for MockClockProgression
impl Unpin for MockClockProgression
impl UnsafeUnpin for MockClockProgression
impl UnwindSafe for MockClockProgression
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