Skip to main content

Update

Trait Update 

Source
pub trait Update<T>: Sealed {
    // Required method
    fn update(&self, t: T);
}
Expand description

Trait providing the update method on timeout trackers

Required Methods§

Source

fn update(&self, t: T)

Update the “earliest timeout” notion, to ensure it’s at least as early as t

This is an unconditional update. Usually, t should be (strictly) in the future.

Implemented for TrackingNow, TrackingInstantNow, and TrackingSystemTimeNow. t can be a SystemTime, Instant, or Duration, (depending on the type of self).

Update<Duration> is not implemented for TrackingSystemTimeNow because tracking of relative times should be done via Instant, as the use of the monotonic clock is more reliable.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§