Type Alias futures_lite::stream::Boxed

source ·
pub type Boxed<T> = Pin<Box<dyn Stream<Item = T> + Send + 'static>>;
Expand description

Type alias for Pin<Box<dyn Stream<Item = T> + Send + 'static>>.

Examples

use futures_lite::stream::{self, StreamExt};

// These two lines are equivalent:
let s1: stream::Boxed<i32> = stream::once(7).boxed();
let s2: stream::Boxed<i32> = Box::pin(stream::once(7));

Aliased Type§

struct Boxed<T> { /* private fields */ }