pub type LocalBoxStream<'a, T> = Pin<Box<dyn Stream<Item = T> + 'a, Global>>;
Expand description

BoxStream, but without the Send requirement.

Aliased Type§

struct LocalBoxStream<'a, T> { /* private fields */ }

Trait Implementations§

source§

impl<P> AsyncBufRead for Pin<P>where P: DerefMut + Unpin, <P as Deref>::Target: AsyncBufRead,

source§

fn poll_fill_buf( self: Pin<&mut Pin<P>>, cx: &mut Context<'_> ) -> Poll<Result<&[u8], Error>>

Attempt to return the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more
source§

fn consume(self: Pin<&mut Pin<P>>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer, so they should no longer be returned in calls to poll_read. Read more
source§

impl<P> AsyncRead for Pin<P>where P: DerefMut + Unpin, <P as Deref>::Target: AsyncRead,

source§

fn poll_read( self: Pin<&mut Pin<P>>, cx: &mut Context<'_>, buf: &mut [u8] ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into buf. Read more
source§

fn poll_read_vectored( self: Pin<&mut Pin<P>>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>] ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more
source§

impl<P> AsyncSeek for Pin<P>where P: DerefMut + Unpin, <P as Deref>::Target: AsyncSeek,

source§

fn poll_seek( self: Pin<&mut Pin<P>>, cx: &mut Context<'_>, pos: SeekFrom ) -> Poll<Result<u64, Error>>

Attempt to seek to an offset, in bytes, in a stream. Read more
source§

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>>

Attempt to write bytes from buf into the object. Read more
source§

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 more
source§

fn poll_flush( self: Pin<&mut Pin<P>>, cx: &mut Context<'_> ) -> Poll<Result<(), Error>>

Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
source§

fn poll_close( self: Pin<&mut Pin<P>>, cx: &mut Context<'_> ) -> Poll<Result<(), Error>>

Attempt to close the object. Read more
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.
source§

impl<P> FusedFuture for Pin<P>where P: DerefMut + Unpin, <P as Deref>::Target: FusedFuture,

source§

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,

source§

fn is_terminated(&self) -> bool

Returns true if the stream should no longer be polled.
1.36.0 · source§

impl<P> Future for Pin<P>where P: DerefMut, <P as Deref>::Target: Future,

§

type Output = <<P as Deref>::Target as Future>::Output

The type of value produced on completion.
source§

fn poll( self: Pin<&mut Pin<P>>, cx: &mut Context<'_> ) -> Poll<<Pin<P> as Future>::Output>

Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
source§

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

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>>

Attempts to prepare the Sink to receive a value. Read more
source§

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
source§

fn poll_flush( self: Pin<&mut Pin<P>>, cx: &mut Context<'_> ) -> Poll<Result<(), <Pin<P> as Sink<Item>>::Error>>

Flush any remaining output from this sink. Read more
source§

fn poll_close( self: Pin<&mut Pin<P>>, cx: &mut Context<'_> ) -> Poll<Result<(), <Pin<P> as Sink<Item>>::Error>>

Flush any remaining output and close this sink, if necessary. Read more
source§

impl<P> Stream for Pin<P>where P: DerefMut + Unpin, <P as Deref>::Target: Stream,

§

type Item = <<P as Deref>::Target as Stream>::Item

Values yielded by the stream.
source§

fn poll_next( self: Pin<&mut Pin<P>>, cx: &mut Context<'_> ) -> Poll<Option<<Pin<P> as Stream>::Item>>

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
source§

impl<'a, T, F> UnsafeFutureObj<'a, T> for Pin<Box<F, Global>>where F: Future<Output = T> + 'a,

source§

fn into_raw(self) -> *mut dyn Future<Output = T> + 'a

Convert an owned instance into a (conceptually owned) fat pointer. Read more
source§

unsafe fn drop(ptr: *mut dyn Future<Output = T> + 'a)

Drops the future represented by the given fat pointer. Read more