Skip to main content

AsyncFuncWithoutPin

Trait AsyncFuncWithoutPin 

Source
pub trait AsyncFuncWithoutPin<Fut>:
    Fn(Context) -> Fut
    + Send
    + Sync
    + 'static
where Fut: Future<Output = ()> + Send + 'static,
{ }
Expand description

Trait for async function handlers.

This trait is used for handlers that return a future directly.

Implementors§

Source§

impl<T, Fut> AsyncFuncWithoutPin<Fut> for T
where T: Fn(Context) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Blanket implementation for all types implementing the required bounds.