pub trait RepeaterEntry {
type Key: Hash + Eq + Unpin + Send + Debug;
// Required methods
fn interval(&self) -> Duration;
fn key(&self) -> Self::Key;
// Provided method
fn delay(&self) -> Delay { ... }
}Expand description
Entry for the Repeater
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn delay(&self) -> Delay
fn delay(&self) -> Delay
Duration after which the first repetition is run
An example: It’s 2:57pm and we want to start a repetition with an interval of 60 seconds, but also want to wait until it’s exactly 3pm. We’d either set the delay to be relative 180 seconds or specify the absolute unix time stamp.
If not implemented, it returns Delay::None starting the repetition instantly
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".