Struct streamcatcher::TxCatcher [−][src]
pub struct TxCatcher<T, Tx> { /* fields omitted */ }
Expand description
A shared stream buffer, using an applied input data transform.
Implementations
impl<T, Tx> TxCatcher<T, Tx> where
T: AsyncRead + Unpin + 'static,
Tx: AsyncTransform<T> + Unpin + 'static,
impl<T, Tx> TxCatcher<T, Tx> where
T: AsyncRead + Unpin + 'static,
Tx: AsyncTransform<T> + Unpin + 'static,
Read all bytes from the underlying stream into the backing store in the current task.
Acquire a new handle to this object, creating a new view of the existing cached data from the beginning.
Returns whether the underlying stream has been finalised, i.e., whether all rope segments have been combined into a single contiguous backing store.
According to Config, this may never become true if finalisation is disabled.
Returns whether the underlying stream is finished, i.e., all bytes it will produce have been stored in some fashion.
Returns the number of bytes taken and stored from the transformed stream.
Returns whether any bytes have been stored from the transformed source.
Spawn a new thread to read all bytes from the underlying stream into the backing store.
Trait Implementations
impl<T, Tx> AsyncRead for TxCatcher<T, Tx> where
T: AsyncRead + Unpin + 'static,
Tx: AsyncTransform<T> + Unpin + 'static,
impl<T, Tx> AsyncRead for TxCatcher<T, Tx> where
T: AsyncRead + Unpin + 'static,
Tx: AsyncTransform<T> + Unpin + 'static,
Attempt to read from the AsyncRead
into buf
. Read more
impl<T, Tx> AsyncSeek for TxCatcher<T, Tx> where
T: AsyncRead + Unpin + 'static,
Tx: AsyncTransform<T> + Unpin + 'static,
impl<T, Tx> AsyncSeek for TxCatcher<T, Tx> where
T: AsyncRead + Unpin + 'static,
Tx: AsyncTransform<T> + Unpin + 'static,
Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Like read
, except that it reads into a slice of buffers. Read more
can_vector
)Determines if this Read
er has an efficient read_vectored
implementation. Read more
Read all bytes until EOF in this source, placing them into buf
. Read more
Read all bytes until EOF in this source, appending them to buf
. Read more
Read the exact number of bytes required to fill buf
. Read more
read_buf
)Pull some bytes from this source into the specified buffer. Read more
read_buf
)Read the exact number of bytes required to fill buf
. Read more
Creates a “by reference” adaptor for this instance of Read
. Read more
Creates an adapter which will chain this stream with another. Read more
Auto Trait Implementations
impl<T, Tx> !RefUnwindSafe for TxCatcher<T, Tx>
impl<T, Tx> !UnwindSafe for TxCatcher<T, Tx>
Blanket Implementations
Creates an adaptor which will chain this stream with another. Read more
Tries to read some bytes directly into the given buf
in asynchronous
manner, returning a future type. Read more
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self> where
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self> where
Self: Unpin,
Creates a future which will read from the AsyncRead
into bufs
using vectored
IO operations. Read more
Creates a future which will read exactly enough bytes to fill buf
,
returning an error if end of file (EOF) is hit sooner. Read more
Creates a future which will read all the bytes from this AsyncRead
. Read more
fn read_to_string(&'a mut self, buf: &'a mut String) -> ReadToString<'a, Self> where
Self: Unpin,
fn read_to_string(&'a mut self, buf: &'a mut String) -> ReadToString<'a, Self> where
Self: Unpin,
Creates a future which will read all the bytes from this AsyncRead
. Read more
Helper method for splitting this read/write object into two halves. Read more
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
Reads some bytes from the byte stream. Read more
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
Like [read()
][AsyncReadExt::read()
], except it reads into a slice of buffers. Read more
fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEndFuture<'a, Self> where
Self: Unpin,
fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEndFuture<'a, Self> where
Self: Unpin,
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> where
Self: Unpin,
Reads the exact number of bytes required to fill buf
. Read more
Creates an adapter which will read at most limit
bytes from it. Read more
impl<S> AsyncSeekExt for S where
S: AsyncSeek + ?Sized,
impl<S> AsyncSeekExt for S where
S: AsyncSeek + ?Sized,
Mutably borrows from an owned value. Read more
Reads some bytes from the byte stream. Read more
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
Reads all bytes from the byte stream. Read more
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
Reads all bytes from the byte stream and appends them into a string. Read more
Reads the exact number of bytes required to fill buf
. Read more
Creates an adaptor which will read at most limit
bytes from it. Read more
Creates a “by reference” adaptor for this instance of Read
. Read more
Transforms this Read
instance to a Stream
over its bytes. Read more