pub trait Bytes: Sized {
type Bytes;
// Required methods
fn to_bytes(self) -> Self::Bytes;
fn from_bytes(value: Self::Bytes) -> Self;
// Provided method
fn bitcast<U: Bytes<Bytes = Self::Bytes>>(self) -> U { ... }
}Expand description
Conversion of SIMD types to and from raw bytes.
Required Associated Types§
Required Methods§
Sourcefn from_bytes(value: Self::Bytes) -> Self
fn from_bytes(value: Self::Bytes) -> Self
Create an instance of this type from an array of bytes.
Provided 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.