Skip to main content

PacketConstruct

Trait PacketConstruct 

Source
pub trait PacketConstruct {
    // Required method
    fn construct(&self) -> Vec<u8> ;
}
Expand description

Trait for packet construction

Implemented by packet types that can be serialized into bytes for transmission. The constructed packet includes the complete protocol header and payload.

Required Methods§

Source

fn construct(&self) -> Vec<u8>

Constructs the complete packet as bytes ready for transmission

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§