Skip to main content

FutureSend

Trait FutureSend 

Source
pub trait FutureSend<T>: Future<Output = T> + Send { }
Expand description

A trait for Send-able futures with a generic output.

This trait is used for asynchronous operations that need to be sendable across threads, such as in the server’s request processing pipeline.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T, O> FutureSend<O> for T
where T: Future<Output = O> + Send,

Blanket implementation of FutureSend for any type that satisfies the bounds.