pub trait PacketBytes: Debug {
    fn new(header_len: usize) -> Self;
    fn header(&self) -> Bytes<'_>;
    fn header_mut(&mut self) -> BytesMut<'_>;
    fn full_header_mut(&mut self) -> BytesMut<'_>;
    fn body(&self) -> BodyBytes<'_>;
    fn body_mut(&mut self) -> BodyBytesMut<'_>;
    fn full_body_mut(&mut self) -> BytesMut<'_>;
}
Expand description

A trait that allows efficient allocation if encryption is used or not.

Required Methods§

Creates a new Bytes instance.

Returns the header Bytes.

Returns the header mutably.

Returns the full header mutably.

Note

Use header_mut instead.

Returns the body.

Returns the body mutably.

Returns the full body mutably.

Note

Use body_mut instead.

Implementors§