pub trait FnContextPinBoxSendSync<T>: FnContextSendSync<SendableAsyncTask<T>> { }Expand description
A trait for functions that return a pinned, boxed, sendable future.
This trait is essential for creating type-erased async function pointers, which is a common pattern for storing and dynamically dispatching different asynchronous handlers in a collection.
Implementors§
impl<F, T> FnContextPinBoxSendSync<T> for Fwhere
F: FnContextSendSync<SendableAsyncTask<T>>,
A blanket implementation for functions that return a pinned, boxed, sendable future.
This trait is a common pattern for asynchronous handlers in Rust, enabling type erasure and dynamic dispatch for futures. It is essential for storing different async functions in a collection.