Skip to main content

SimpleTimer

Trait SimpleTimer 

Source
pub trait SimpleTimer {
    type Context;

    // Required method
    fn timeout(self, scope: &mut Scope<'_, Self::Context>) -> Self;
}
Expand description

The timer trait used in the Ticker<Interval<T>>

Required Associated Types§

Required Methods§

Source

fn timeout(self, scope: &mut Scope<'_, Self::Context>) -> Self

Called when time elapsed

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<C> SimpleTimer for Box<dyn FnMut(&mut Scope<'_, C>) + Send>

Source§

type Context = C

Source§

fn timeout(self, scope: &mut Scope<'_, Self::Context>) -> Self

Implementors§