Skip to main content

EventOnceExt

Trait EventOnceExt 

Source
pub trait EventOnceExt<T>: Sync {
    // Required method
    fn call<'life0, 'life1, 'async_trait>(
        self,
        ctx: &'life0 mut Context,
        input: &'life1 mut T,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn call<'life0, 'life1, 'async_trait>( self, ctx: &'life0 mut Context, input: &'life1 mut T, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, I, F> EventOnceExt<I> for T
where T: FnOnce(&mut Context, &mut I) -> F + Sync + Send + 'static, I: Sync + Send + 'static, F: Future<Output = Result<(), Error>> + Send,