pub type BoxStream<'a, T> = Pin<Box<dyn Stream<Item = T> + Send + 'a, Global>>;
Expand description
An owned dynamically typed Stream
for use in cases where you can’t
statically type your result or need to add some indirection.
Aliased Type§
struct BoxStream<'a, T> { /* private fields */ }
Trait Implementations§
source§impl<P> AsyncBufRead for Pin<P>where
P: DerefMut + Unpin,
<P as Deref>::Target: AsyncBufRead,
impl<P> AsyncBufRead for Pin<P>where P: DerefMut + Unpin, <P as Deref>::Target: AsyncBufRead,
source§impl<P> AsyncRead for Pin<P>where
P: DerefMut + Unpin,
<P as Deref>::Target: AsyncRead,
impl<P> AsyncRead for Pin<P>where P: DerefMut + Unpin, <P as Deref>::Target: AsyncRead,
source§impl<P> AsyncWrite for Pin<P>where
P: DerefMut + Unpin,
<P as Deref>::Target: AsyncWrite,
impl<P> AsyncWrite for Pin<P>where P: DerefMut + Unpin, <P as Deref>::Target: AsyncWrite,
source§fn poll_write(
self: Pin<&mut Pin<P>>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize, Error>>
fn poll_write( self: Pin<&mut Pin<P>>, cx: &mut Context<'_>, buf: &[u8] ) -> Poll<Result<usize, Error>>
Attempt to write bytes from
buf
into the object. Read moresource§fn poll_write_vectored(
self: Pin<&mut Pin<P>>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
fn poll_write_vectored( self: Pin<&mut Pin<P>>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>] ) -> Poll<Result<usize, Error>>
Attempt to write bytes from
bufs
into the object using vectored
IO operations. Read moresource§impl<P> FusedFuture for Pin<P>where
P: DerefMut + Unpin,
<P as Deref>::Target: FusedFuture,
impl<P> FusedFuture for Pin<P>where P: DerefMut + Unpin, <P as Deref>::Target: FusedFuture,
source§fn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
Returns
true
if the underlying future should no longer be polled.source§impl<P> FusedStream for Pin<P>where
P: DerefMut + Unpin,
<P as Deref>::Target: FusedStream,
impl<P> FusedStream for Pin<P>where P: DerefMut + Unpin, <P as Deref>::Target: FusedStream,
source§fn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
Returns
true
if the stream should no longer be polled.source§impl<P, Item> Sink<Item> for Pin<P>where
P: DerefMut + Unpin,
<P as Deref>::Target: Sink<Item>,
impl<P, Item> Sink<Item> for Pin<P>where P: DerefMut + Unpin, <P as Deref>::Target: Sink<Item>,
§type Error = <<P as Deref>::Target as Sink<Item>>::Error
type Error = <<P as Deref>::Target as Sink<Item>>::Error
The type of value produced by the sink when an error occurs.
source§fn poll_ready(
self: Pin<&mut Pin<P>>,
cx: &mut Context<'_>
) -> Poll<Result<(), <Pin<P> as Sink<Item>>::Error>>
fn poll_ready( self: Pin<&mut Pin<P>>, cx: &mut Context<'_> ) -> Poll<Result<(), <Pin<P> as Sink<Item>>::Error>>
Attempts to prepare the
Sink
to receive a value. Read moresource§fn start_send(
self: Pin<&mut Pin<P>>,
item: Item
) -> Result<(), <Pin<P> as Sink<Item>>::Error>
fn start_send( self: Pin<&mut Pin<P>>, item: Item ) -> Result<(), <Pin<P> as Sink<Item>>::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read more