Skip to main content

Poll

Trait Poll 

Source
pub trait Poll<T, C>:
    Send
    + Sync
    + FromConfig<C> {
    // Required methods
    fn poll<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<PollResponse<T>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_initial_delay(&self) -> Duration;
    fn get_interval(&self) -> Interval;
}

Required Methods§

Source

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

Source

fn get_initial_delay(&self) -> Duration

Source

fn get_interval(&self) -> Interval

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Poll<u128, TimerConfig> for Timer

§Parameters

  • u128: output