Skip to main content Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. Rust
  4. pw_kernel
  5. kernel
  6. TimerCallback

TimerCallback

Trait TimerCallback 

Source
pub trait TimerCallback<K: Kernel> {
    // Required method
    fn callback(
        &mut self,
        kernel: K,
        timer: ForeignBox<Timer<K>>,
        now: Instant<K::Clock>,
    ) -> Option<ForeignBox<Timer<K>>>;
}

Required Methods§

Source

fn callback( &mut self, kernel: K, timer: ForeignBox<Timer<K>>, now: Instant<K::Clock>, ) -> Option<ForeignBox<Timer<K>>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<K, F> TimerCallback<K> for F
where K: Kernel, F: FnMut(K, ForeignBox<Timer<K>>, Instant<K::Clock>) -> Option<ForeignBox<Timer<K>>>,