[][src]Struct governor::clock::FakeRelativeClock

pub struct FakeRelativeClock { /* fields omitted */ }

A mock implementation of a clock. All it does is keep track of what "now" is (relative to some point meaningful to the program), and returns that.

Thread safety

The mock time is represented as an atomic u64 count of nanoseconds, behind an Arc. Clones of this clock will all show the same time, even if the original advances.

Implementations

impl FakeRelativeClock[src]

pub fn advance(&self, by: Duration)[src]

Advances the fake clock by the given amount.

Trait Implementations

impl Clock for FakeRelativeClock[src]

type Instant = Nanos

A measurement of a monotonically increasing clock.

impl Clone for FakeRelativeClock[src]

impl Debug for FakeRelativeClock[src]

impl Default for FakeRelativeClock[src]

impl PartialEq<FakeRelativeClock> for FakeRelativeClock[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,