Trait ppp_packet::records::options::OptionsImplLayout

source ·
pub trait OptionsImplLayout {
    type Error;

    const OPTION_LEN_MULTIPLIER: usize = 1usize;
    const END_OF_OPTIONS: Option<u8> = _;
    const NOP: Option<u8> = _;
}
Expand description

Common traits of option parsing and serialization.

This is split from OptionsImpl and OptionsSerializerImpl so that the associated types do not depend on the lifetime parameter to OptionsImpl and provide common behavior to parsers and serializers.

Required Associated Types§

source

type Error

The error type that can be returned in Options parsing.

Provided Associated Constants§

source

const OPTION_LEN_MULTIPLIER: usize = 1usize

The value to multiply read lengths by.

By default, this value is 1, but for some protocols (such as NDP) this may be different.

source

const END_OF_OPTIONS: Option<u8> = _

The End of options type (if one exists).

source

const NOP: Option<u8> = _

The No-op type (if one exists).

Object Safety§

This trait is not object safe.

Implementors§

source§

impl OptionsImplLayout for ppp_packet::ipv4::ControlOptionsImpl

§

type Error = ()

source§

const END_OF_OPTIONS: Option<u8> = None

source§

const NOP: Option<u8> = None

source§

impl OptionsImplLayout for ppp_packet::ipv6::ControlOptionsImpl

§

type Error = ()

source§

const END_OF_OPTIONS: Option<u8> = None

source§

const NOP: Option<u8> = None

source§

impl OptionsImplLayout for ppp_packet::link::ControlOptionsImpl

§

type Error = ()

source§

const END_OF_OPTIONS: Option<u8> = None

source§

const NOP: Option<u8> = None