pub struct FramedParts<T, U> {
pub io: T,
pub codec: U,
pub read_buf: BytesMut,
pub write_buf: BytesMut,
/* private fields */
}
Available on crate feature
codec
only.Expand description
FramedParts
contains an export of the data of a Framed transport.
It can be used to construct a new Framed
with a different codec.
It contains all current buffers and the inner transport.
Fields§
§io: T
The inner transport used to read bytes to and write bytes to
codec: U
The codec
read_buf: BytesMut
The buffer with read but unprocessed data.
write_buf: BytesMut
A buffer with unprocessed data which are not written yet.
Implementations§
Source§impl<T, U> FramedParts<T, U>
impl<T, U> FramedParts<T, U>
Sourcepub fn new<I>(io: T, codec: U) -> FramedParts<T, U>where
U: Encoder<I>,
pub fn new<I>(io: T, codec: U) -> FramedParts<T, U>where
U: Encoder<I>,
Create a new, default, FramedParts
Trait Implementations§
Auto Trait Implementations§
impl<T, U> Freeze for FramedParts<T, U>
impl<T, U> RefUnwindSafe for FramedParts<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for FramedParts<T, U>
impl<T, U> Sync for FramedParts<T, U>
impl<T, U> Unpin for FramedParts<T, U>
impl<T, U> UnwindSafe for FramedParts<T, U>where
T: UnwindSafe,
U: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.