pub trait ClosureTimer: WallClockTimer {
// Required method
fn schedule_action_at<F>(
&mut self,
id: Self::Id,
deadline: SystemTime,
action: F,
) -> Result<(), Self::Error>
where F: FnOnce(Self::Id) + Send + 'static;
}Expand description
Convenience API for timers that use the closure state types.
Required Methods§
Sourcefn schedule_action_at<F>(
&mut self,
id: Self::Id,
deadline: SystemTime,
action: F,
) -> Result<(), Self::Error>
fn schedule_action_at<F>( &mut self, id: Self::Id, deadline: SystemTime, action: F, ) -> Result<(), Self::Error>
Schedule action to be executed at deadline.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.