pub trait Sealed:
Default
+ Copy
+ TryFrom<usize>
+ Eq
+ Hash {
type Bytes: Default + Sized + AsRef<[u8]> + AsMut<[u8]>;
// Required methods
fn from_le_bytes(bytes: Self::Bytes) -> Self;
fn to_le_bytes(self) -> Self::Bytes;
fn from_usize(val: usize) -> Self;
fn into_usize(self) -> usize;
}Expand description
Sealed trait implemented for u32 and u64.
Required Associated Types§
Required Methods§
fn from_le_bytes(bytes: Self::Bytes) -> Self
fn to_le_bytes(self) -> Self::Bytes
fn from_usize(val: usize) -> Self
fn into_usize(self) -> usize
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.