pub struct Framed<U> { /* private fields */ }Expand description
A unified interface to an underlying I/O object, using
the Encoder and Decoder traits to encode and decode frames.
Framed is heavily optimized for streaming io.
Implementations§
Source§impl<U> Framed<U>
impl<U> Framed<U>
Sourcepub fn new<Io>(io: Io, codec: U) -> Framed<U>
pub fn new<Io>(io: Io, codec: U) -> Framed<U>
Provides an interface for reading and writing to
Io object, using Decode and Encode traits of codec.
Sourcepub fn get_io(&self) -> &IoBoxed
pub fn get_io(&self) -> &IoBoxed
Returns a reference to the underlying I/O stream wrapped by Framed.
Sourcepub fn into_inner(self) -> (IoBoxed, U)
pub fn into_inner(self) -> (IoBoxed, U)
Return inner types of framed object