pub trait PollCallback<T: SEResource>: Clone + Send + Sync + 'static {
    // Required method
    fn callback<'life0, 'async_trait>(
        &'life0 self,
        resource: T
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A trait implemented by types that can be used as a poll callback by Client::start_poll.

Required Methods§

source

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

Implementors§

source§

impl<F, R, T: SEResource> PollCallback<T> for Fwhere F: Fn(T) -> R + Send + Sync + Clone + 'static, R: Future<Output = ()> + Send + 'static,

Automatically implemented for all Fn with a matching function signature.