Trait governor::clock::Clock

source ·
pub trait Clock: Clone {
    type Instant: Reference;

    // Required method
    fn now(&self) -> Self::Instant;
}
Expand description

A time source used by rate limiters.

Required Associated Types§

source

type Instant: Reference

A measurement of a monotonically increasing clock.

Required Methods§

source

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

Returns a measurement of the clock.

Object Safety§

This trait is not object safe.

Implementors§