EncodeOps

Trait EncodeOps 

Source
pub trait EncodeOps<T, const N: usize> {
    // Required methods
    fn to_le_bytes(&self) -> [T; N];
    fn to_be_bytes(&self) -> [T; N];
    fn from_le_bytes(x: [T; N]) -> Self;
    fn from_be_bytes(x: [T; N]) -> Self;
}
Expand description

A trait for byte conversion operations provided by Rust for machine integers

Required Methods§

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§