CapturedFuture

Type Alias CapturedFuture 

Source
pub type CapturedFuture<OutputT> = Pin<Box<dyn Future<Output = OutputT> + Send>>;
Expand description

A thread-safe and pinned dyn Future.

Returning a CapturedFuture can allow us to call async code in a non-async function, e.g. the polling function for futures, readers, writers, etc.

See also crate::capture_async.

Aliased Typeยง

pub struct CapturedFuture<OutputT> { /* private fields */ }