pub struct MockClock { /* private fields */ }Implementations§
Source§impl MockClock
impl MockClock
pub fn new(initial_nanos: u64) -> Self
pub fn from_millis(millis: u64) -> Self
pub fn now_nanos(&self) -> u64
pub fn now_micros(&self) -> u64
pub fn now_millis(&self) -> u64
pub fn now_secs(&self) -> u64
pub fn set_nanos(&self, nanos: u64)
pub fn set_micros(&self, micros: u64)
pub fn set_millis(&self, millis: u64)
pub fn advance_nanos(&self, nanos: u64)
pub fn advance_micros(&self, micros: u64)
pub fn advance_millis(&self, millis: u64)
pub fn advance_secs(&self, secs: u64)
pub fn advance_minutes(&self, minutes: u64)
pub fn advance_hours(&self, hours: u64)
pub fn advance_days(&self, days: u64)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MockClock
impl RefUnwindSafe for MockClock
impl Send for MockClock
impl Sync for MockClock
impl Unpin for MockClock
impl UnsafeUnpin for MockClock
impl UnwindSafe for MockClock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more