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> { /* private fields */ }

Trait Implementations§

1.33.0 · source§

impl<P> Deref for Pin<P>where P: Deref,

§

type Target = <P as Deref>::Target

The resulting type after dereferencing.
source§

fn deref(&self) -> &<P as Deref>::Target

Dereferences the value.