Trait nix_compat::wire::bytes::reader::trailer::Tag

source ·
pub(crate) trait Tag {
    type Buf: AsRef<[u8]> + AsMut<[u8]> + Debug + Unpin;

    const PATTERN: &'static [u8];

    // Required method
    fn make_buf() -> Self::Buf;
}
Expand description

Tag defines a “trailer tag”: specific, fixed bytes that must follow wire data.

Required Associated Types§

source

type Buf: AsRef<[u8]> + AsMut<[u8]> + Debug + Unpin

Suitably sized buffer for reading Self::PATTERN

HACK: This is a workaround for const generics limitations.

Required Associated Constants§

source

const PATTERN: &'static [u8]

The expected suffix

The first 8 bytes may be ignored, and it must be an 8-byte aligned size.

Required Methods§

source

fn make_buf() -> Self::Buf

Make an instance of Self::Buf

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Tag for PadPar

source§

const PATTERN: &'static [u8] = _

source§

type Buf = [u8; 24]

source§

impl Tag for Pad

source§

const PATTERN: &'static [u8] = _

source§

type Buf = [u8; 8]