Struct FramedParts
pub struct FramedParts<T, U> { pub io: T, pub codec: U, pub read_buf: BytesMut, pub write_buf: BytesMut, /* private fields */ }
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: TThe inner transport used to read bytes to and write bytes to
codec: UThe codec
read_buf: BytesMutThe buffer with read but unprocessed data.
write_buf: BytesMutA buffer with unprocessed data which are not written yet.
Implementations
impl<T, U> FramedParts<T, U>
fn new<I>(io: T, codec: U) -> FramedParts<T, U> where U: Encoder<I>,Create a new, default,
FramedParts
Trait Implementations
impl<T: Debug, U: Debug> Debug for FramedParts<T, U>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<T, U> Freeze for FramedParts<T, U>
where
T: Freeze,
U: Freeze,
impl<T, U> RefUnwindSafe for FramedParts<T, U>
where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for FramedParts<T, U>
where
T: Send,
U: Send,
impl<T, U> Sync for FramedParts<T, U>
where
T: Sync,
U: Sync,
impl<T, U> Unpin for FramedParts<T, U>
where
T: Unpin,
U: Unpin,
impl<T, U> UnsafeUnpin for FramedParts<T, U>
where
T: UnsafeUnpin,
U: UnsafeUnpin,
impl<T, U> UnwindSafe for FramedParts<T, U>
where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
impl<T> Any for FramedParts<T, U>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for FramedParts<T, U>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for FramedParts<T, U>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for FramedParts<T, U>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for FramedParts<T, U>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for FramedParts<T, U>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for FramedParts<T, U>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>