[−][src]Trait ratelimit_meter::clock::Reference
A measurement from a clock.
Required methods
fn duration_since(&self, earlier: Self) -> Duration
Determines the time that separates two measurements of a
clock. Implementations of this must perform a saturating
subtraction - if the earlier
timestamp should be later,
duration_since
must return the zero duration.
fn saturating_sub(&self, duration: Duration) -> Self
Returns a reference point that lies at most duration
in the
past from the current reference. If an underflow should occur,
returns the current reference.
Implementations on Foreign Types
impl Reference for Duration
[src]
fn duration_since(&self, earlier: Self) -> Duration
[src]
fn saturating_sub(&self, duration: Duration) -> Self
[src]
impl Reference for Instant
[src]
fn duration_since(&self, earlier: Self) -> Duration
[src]
fn saturating_sub(&self, duration: Duration) -> Self
[src]
impl Reference for SystemTime
[src]
fn duration_since(&self, earlier: Self) -> Duration
[src]
Returns the difference in times between the two SystemTimes. Due to the fallible nature of SystemTimes, returns the zero duration if a negative duration would result (e.g. due to system clock adjustments).