Struct ftvf::FakeNowSource
source · pub struct FakeNowSource {
pub now: Duration,
}
Expand description
A fake NowSource
that is entirely under your control. Thinly wraps a
Duration
representing the current “now”, starting at zero. You can
manipulate time by manipulating the now
field directly, or by using +=
with a Duration
on the right hand side.
Fields§
§now: Duration
How long since an arbitrary origin. Manipulate this field directly to manipulate time itself. (Don’t kill your own grandfather.)
Trait Implementations§
source§impl AddAssign<Duration> for FakeNowSource
impl AddAssign<Duration> for FakeNowSource
source§fn add_assign(&mut self, rhs: Duration)
fn add_assign(&mut self, rhs: Duration)
Performs the
+=
operation. Read moresource§impl Clone for FakeNowSource
impl Clone for FakeNowSource
source§fn clone(&self) -> FakeNowSource
fn clone(&self) -> FakeNowSource
Returns a copy 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 FakeNowSource
impl Debug for FakeNowSource
source§impl Default for FakeNowSource
impl Default for FakeNowSource
source§fn default() -> FakeNowSource
fn default() -> FakeNowSource
Returns the “default value” for a type. Read more
source§impl NowSource for FakeNowSource
impl NowSource for FakeNowSource
impl Copy for FakeNowSource
Auto Trait Implementations§
impl RefUnwindSafe for FakeNowSource
impl Send for FakeNowSource
impl Sync for FakeNowSource
impl Unpin for FakeNowSource
impl UnwindSafe for FakeNowSource
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