ppp_packet::records::options

Trait 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.

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).

Required Associated Types§

Source

type Error

The error type that can be returned in Options parsing.

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§