pub trait TimerService: ErrorType {
    type Timer<'a>: OnceTimer<Error = Self::Error> + PeriodicTimer<Error = Self::Error> + 'a
       where Self: 'a;

    // Required method
    fn timer<F>(&self, callback: F) -> Result<Self::Timer<'_>, Self::Error>
       where F: FnMut() + Send + 'static;
}

Required Associated Types§

source

type Timer<'a>: OnceTimer<Error = Self::Error> + PeriodicTimer<Error = Self::Error> + 'a where Self: 'a

Required Methods§

source

fn timer<F>(&self, callback: F) -> Result<Self::Timer<'_>, Self::Error>
where F: FnMut() + Send + 'static,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<S> TimerService for &S
where S: TimerService,

§

type Timer<'a> = <S as TimerService>::Timer<'a> where Self: 'a

source§

fn timer<F>(&self, callback: F) -> Result<Self::Timer<'_>, Self::Error>
where F: FnMut() + Send + 'static,

source§

impl<S> TimerService for &mut S
where S: TimerService,

§

type Timer<'a> = <S as TimerService>::Timer<'a> where Self: 'a

source§

fn timer<F>(&self, callback: F) -> Result<Self::Timer<'_>, Self::Error>
where F: FnMut() + Send + 'static,

Implementors§