Trait PartialPacketBuilder

Source
pub trait PartialPacketBuilder: PacketBuilder {
    // Required method
    fn partial_serialize(&self, body_len: usize, buffer: &mut [u8]);
}
Expand description

A packet builder used for partial packet serialization.

Required Methods§

Source

fn partial_serialize(&self, body_len: usize, buffer: &mut [u8])

Serializes the header to the specified buffer.

Checksums (if any) should not calculated. The corresponding fields should be set to 0.

body_len specifies size of the packet body wrapped by this PacketBuilder. It is supplied so the correct packet size can be written in the header.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl PartialPacketBuilder for ()

Source§

fn partial_serialize(&self, _body_len: usize, _buffer: &mut [u8])

Implementors§