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§
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,
Object Safety§
This trait is not object safe.