Trait ring::endian::Encoding

source ·
pub trait Encoding<T>: From<T> + Into<T>
where Self: Copy,
{ const ZERO: Self; }
Expand description

An Encoding of a type T can be converted to/from its byte representation without any byte swapping or other computation.

The Self: Copy constraint addresses clippy::declare_interior_mutable_const.

Required Associated Constants§

source

const ZERO: Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Encoding<u32> for BigEndian<u32>

source§

const ZERO: Self = _