mdns::protocol

Trait EmbeddedPacketBuilder

Source
pub trait EmbeddedPacketBuilder {
    // Required methods
    fn bytes_len(&self) -> usize;
    fn serialize<B: SplitByteSliceMut, 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: SplitByteSliceMut, 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.

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.

Implementors§