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