Struct asynchronous_codec::FramedWriteParts
source · pub struct FramedWriteParts<T, E> {
pub io: T,
pub encoder: E,
pub buffer: BytesMut,
/* private fields */
}Expand description
The parts obtained from FramedWrite::into_parts.
Fields
io: TThe underlying I/O stream.
encoder: EThe frame encoder.
buffer: BytesMutThe framed data that has been buffered but not yet flushed to io.
Implementations
sourceimpl<T, E> FramedWriteParts<T, E>
impl<T, E> FramedWriteParts<T, E>
sourcepub fn map_encoder<G, F>(self, f: F) -> FramedWriteParts<T, G>where
G: Encoder,
F: FnOnce(E) -> G,
pub fn map_encoder<G, F>(self, f: F) -> FramedWriteParts<T, G>where
G: Encoder,
F: FnOnce(E) -> G,
Changes the encoder used in FramedWriteParts.
Auto Trait Implementations
impl<T, E> RefUnwindSafe for FramedWriteParts<T, E>where
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, E> Send for FramedWriteParts<T, E>where
E: Send,
T: Send,
impl<T, E> Sync for FramedWriteParts<T, E>where
E: Sync,
T: Sync,
impl<T, E> Unpin for FramedWriteParts<T, E>where
E: Unpin,
T: Unpin,
impl<T, E> UnwindSafe for FramedWriteParts<T, E>where
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more