pub trait Endianness: Endianness {
    const NAME: &'static str;
    const IS_LITTLE: bool;
    const IS_BIG: bool;
}
Expand description

Marker trait for endianness selector types.

Its only implementations are LittleEndian and BigEndian

Note that in principle marker traits are not necessary to use selector types, but they are useful to avoid that the user specifies a nonsensical type, and to document the meaning of type parameters.

Required Associated Constants§

source

const NAME: &'static str

The name of the endianness.

source

const IS_LITTLE: bool

Whether the endianness is little-endian.

source

const IS_BIG: bool

Whether the endianness is big-endian.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Endianness> Endianness for T

source§

const NAME: &'static str = T::_NAME

source§

const IS_LITTLE: bool = T::_IS_LITTLE

source§

const IS_BIG: bool = T::_IS_BIG