Type Alias futures_lite::stream::BoxedLocal

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

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

§Examples

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

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

Aliased Type§

struct BoxedLocal<T> {}