Trait product_os_async_executor::Timer

source ·
pub trait Timer: Send + Sync {
    // Required methods
    fn once<'async_trait>(
        duration_millis: u32,
    ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn interval<'async_trait>(
        duration_millis: u32,
    ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn cancel<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn once_sync(duration_millis: u32) -> Self;
    fn interval_sync(duration_millis: u32) -> Self;
    fn cancel_sync(&mut self);
    fn tick<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = u32> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn once<'async_trait>( duration_millis: u32, ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
where Self: 'async_trait,

source

fn interval<'async_trait>( duration_millis: u32, ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
where Self: 'async_trait,

source

fn cancel<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn once_sync(duration_millis: u32) -> Self

source

fn interval_sync(duration_millis: u32) -> Self

source

fn cancel_sync(&mut self)

source

fn tick<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = u32> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§