Struct packet_stream_codec::CodecStream
[−]
[src]
pub struct CodecStream<R> { /* fields omitted */ }
This stream decodes pairs of data and metadata from the wrapped
AsyncRead
of type R
.
Methods
impl<R> CodecStream<R>
[src]
pub fn new(reader: R) -> CodecStream<R>
[src]
Create a new CodecStream
, wrapping the given reader.
pub fn into_inner(self) -> R
[src]
Consume the CodecStream
to retrieve ownership of the inner reader.
Trait Implementations
impl<R: AsyncRead> Stream for CodecStream<R>
[src]
type Item = (Box<[u8]>, Metadata)
Values yielded by the stream.
type Error = Error
Errors yielded by the stream.
fn poll_next(
&mut self,
cx: &mut Context
) -> Poll<Option<Self::Item>, Self::Error>
[src]
&mut self,
cx: &mut Context
) -> Poll<Option<Self::Item>, Self::Error>
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
Auto Trait Implementations
impl<R> Send for CodecStream<R> where
R: Send,
R: Send,
impl<R> Sync for CodecStream<R> where
R: Sync,
R: Sync,