Skip to main content

PacketStorage

Trait PacketStorage 

Source
pub trait PacketStorage: AsRef<[u8]> {
    // Required method
    fn to_shared(&self) -> PacketBytes;
}
Expand description

Storage for a packet’s wire bytes that can hand them over as shared PacketBytes: shared bytes are cloned, anything else is copied.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl PacketStorage for &[u8]

Source§

impl PacketStorage for Arc<[u8]>

Source§

impl PacketStorage for Vec<u8>

Implementors§