pub trait EmbeddedPacketBuilder {
    // Required methods
    fn bytes_len(&self) -> usize;
    fn serialize<B: ByteSliceMut, BV: BufferViewMut<B>>(&self, bv: &mut BV);

    // Provided method
    fn bytes(&self) -> Vec<u8> { ... }
}
Expand description

Packet builder that doesn’t do any auxiliary storage.

Required Methods§

source

fn bytes_len(&self) -> usize

source

fn serialize<B: ByteSliceMut, BV: BufferViewMut<B>>(&self, bv: &mut BV)

Provided Methods§

source

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

Return the output of packet building as a Vec, useful for tests that don’t care about zerocopy resource constraints.

Object Safety§

This trait is not object safe.

Implementors§