Trait FutureExt

Source
pub trait FutureExt:
    Future
    + Send
    + Sized {
    // Provided method
    fn always_send(self) -> AlwaysSend<Self>  { ... }
}
Expand description

Convenience extension trait for easy construction of the AlwaysSend wrapper for futures in method chains.

As an extension trait, you can import this without a name, like

use always_send::FutureExt as _;

for minimizing the potential for ambiguities.

Provided Methods§

Source

fn always_send(self) -> AlwaysSend<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<F: Future + Send> FutureExt for F