pub trait Update<T>: Sealed {
// Required method
fn update(&self, t: T);
}Expand description
Trait providing the update method on timeout trackers
Required Methods§
Sourcefn update(&self, t: T)
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.