pub trait WatchdogCallback: Send + Sync {
// Required method
fn on_timeout<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Trait for responding to watchdog timeouts.
Implement this trait whenever you want to respond to watchdog timeouts, then pass
your instance to add_callback() on the WatchdogPlatform
trait.
Required Methods§
Implementors§
impl<F> WatchdogCallback for F
Blanket implementation of WatchdogCallback
for closures.
This allows you to pass simple closures directly as callbacks without needing to create a struct.