[][src]Trait ratelimit_meter::clock::Clock

pub trait Clock: Default + Clone {
    type Instant: Reference;
    fn now(&self) -> Self::Instant;
}

A time source used by rate limiters.

Associated Types

type Instant: Reference

A measurement of a monotonically increasing clock.

Loading content...

Required methods

fn now(&self) -> Self::Instant

Returns a measurement of the clock.

Loading content...

Implementors

impl Clock for FakeAbsoluteClock[src]

type Instant = Instant

impl Clock for FakeRelativeClock[src]

type Instant = Duration

impl Clock for MonotonicClock[src]

type Instant = Instant

impl Clock for SystemClock[src]

type Instant = SystemTime

impl Clock for ForeverClock[src]

type Instant = Always

Loading content...