set_guarded

Function set_guarded 

Source
pub fn set_guarded(
    slot: &'static TimerSlot,
    delay: Duration,
    label: impl Into<String>,
    task: impl Future<Output = ()> + 'static,
) -> bool
Expand description

Schedule a one-shot timer only if the slot is empty. Returns true when a new timer was scheduled.