pub trait Primitive<T, const S: usize> {
// Required methods
fn from_ne_bytes(bytes: [u8; S]) -> Self;
fn from_le_bytes(bytes: [u8; S]) -> Self;
fn from_be_bytes(bytes: [u8; S]) -> Self;
fn to_ne_bytes(self) -> [u8; S];
fn to_le_bytes(self) -> [u8; S];
fn to_be_bytes(self) -> [u8; S];
}Required Methods§
fn from_ne_bytes(bytes: [u8; S]) -> Self
fn from_le_bytes(bytes: [u8; S]) -> Self
fn from_be_bytes(bytes: [u8; S]) -> Self
fn to_ne_bytes(self) -> [u8; S]
fn to_le_bytes(self) -> [u8; S]
fn to_be_bytes(self) -> [u8; S]
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.