pub trait Packet: Deref<Target = [u8]> + DerefMut {
    fn capacity(&self) -> usize;
fn resize(&mut self, len: usize, val: u8); fn extend(&mut self, other: &[u8]) { ... }
fn truncate(&mut self, len: usize) { ... }
fn clear(&mut self) { ... }
fn as_slice(&self) -> &[u8]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8] { ... }
fn as_mut_slice(&mut self) -> &mut [u8]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8] { ... } }
Expand description

A trait for packet buffers used by turbulence.

Required methods

Static capacity of this packet

Resizes the packet to the given length, which must be at most the static capacity.

Provided methods

Implementors