pub trait ToBytes: Sealed {
type Bytes: Copy + Unpin + Send + Sync + AsRef<[u8]> + AsMut<[u8]> + SimdUint<Scalar = u8> + 'static;
// Required methods
fn to_ne_bytes(self) -> Self::Bytes;
fn to_be_bytes(self) -> Self::Bytes;
fn to_le_bytes(self) -> Self::Bytes;
fn from_ne_bytes(bytes: Self::Bytes) -> Self;
fn from_be_bytes(bytes: Self::Bytes) -> Self;
fn from_le_bytes(bytes: Self::Bytes) -> Self;
}
🔬This is a nightly-only experimental API. (
portable_simd
)Expand description
Converts SIMD vectors to vectors of bytes