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
Trait Implementations§
Auto Trait Implementations§
impl<U> !Freeze for Framed<U>
impl<U> !RefUnwindSafe for Framed<U>
impl<U> !Send for Framed<U>
impl<U> !Sync for Framed<U>
impl<U> Unpin for Framed<U>where
U: Unpin,
impl<U> !UnwindSafe for Framed<U>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more