Skip to main content

TaskFuture

Trait TaskFuture 

Source
pub trait TaskFuture<T>: Future<Output = T> + TaskSend { }
Expand description

A type-erased future that preserves the target’s task mobility bound.

This behavioral trait lets public and internal boxed-future aliases name TaskSend once instead of spelling target-specific dyn Future + Send forks at every erasure site.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T, F> TaskFuture<T> for F
where F: Future<Output = T> + TaskSend + ?Sized,