Struct transmog_async::TransmogReader
source · [−]pub struct TransmogReader<R, T, F> { /* private fields */ }
Expand description
A wrapper around an asynchronous reader that produces an asynchronous stream of Transmog-decoded values.
To use, provide a reader that implements AsyncRead
, and then use
Stream
to access the deserialized values.
Note that the sender must prefix each serialized item with its size
encoded using ordered-varint
.
Implementations
Gets a reference to the underlying reader.
It is inadvisable to directly read from the underlying reader.
Gets a mutable reference to the underlying reader.
It is inadvisable to directly read from the underlying reader.
Returns a reference to the internally buffered data.
This will not attempt to fill the buffer if it is empty.
Unwraps this TransmogReader
, returning the underlying reader.
Note that any leftover data in the internal buffer is lost.
Returns a new instance that reads format
-encoded data for reader
.
Returns a new instance that reads format
-encoded data for R::default()
.
Trait Implementations
impl<R, T, F> Stream for TransmogReader<R, T, F> where
R: AsyncRead + Unpin,
F: OwnedDeserializer<T>,
impl<R, T, F> Stream for TransmogReader<R, T, F> where
R: AsyncRead + Unpin,
F: OwnedDeserializer<T>,
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