pub trait ToBytes: Sealed { typeBytes:Copy +Unpin +Send +Sync +AsRef<[u8]> +AsMut<[u8]> +SimdUint<Scalar =u8> + 'static; // Required methods fnto_ne_bytes(self) -> Self::Bytes; fnto_be_bytes(self) -> Self::Bytes; fnto_le_bytes(self) -> Self::Bytes; fnfrom_ne_bytes(bytes: Self::Bytes) -> Self; fnfrom_be_bytes(bytes: Self::Bytes) -> Self; fnfrom_le_bytes(bytes: Self::Bytes) -> Self;}🔬This is a nightly-only experimental API. (
portable_simd #86656)Expand description
Converts SIMD vectors to vectors of bytes
Required Associated Types§
Required Methods§
Sourcefnto_ne_bytes(self) -> Self::Bytes
🔬This is a nightly-only experimental API. (portable_simd #86656)
fnto_ne_bytes(self) -> Self::Bytes
portable_simd #86656)Returns the memory representation of this integer as a byte array in native byteorder.
Sourcefnto_be_bytes(self) -> Self::Bytes
🔬This is a nightly-only experimental API. (portable_simd #86656)
fnto_be_bytes(self) -> Self::Bytes
portable_simd #86656)Returns the memory representation of this integer as a byte array in big-endian(network) byte order.
Sourcefnto_le_bytes(self) -> Self::Bytes
🔬This is a nightly-only experimental API. (portable_simd #86656)
fnto_le_bytes(self) -> Self::Bytes
portable_simd #86656)Returns the memory representation of this integer as a byte array in little-endianbyte order.
Sourcefnfrom_ne_bytes(bytes: Self::Bytes) -> Self
🔬This is a nightly-only experimental API. (portable_simd #86656)
fnfrom_ne_bytes(bytes: Self::Bytes) -> Self
portable_simd #86656)Creates a native endian integer value from its memory representation as a byte arrayin native endianness.
Sourcefnfrom_be_bytes(bytes: Self::Bytes) -> Self
🔬This is a nightly-only experimental API. (portable_simd #86656)
fnfrom_be_bytes(bytes: Self::Bytes) -> Self
portable_simd #86656)Creates an integer value from its representation as a byte array in big endian.
Sourcefnfrom_le_bytes(bytes: Self::Bytes) -> Self
🔬This is a nightly-only experimental API. (portable_simd #86656)
fnfrom_le_bytes(bytes: Self::Bytes) -> Self
portable_simd #86656)Creates an integer value from its representation as a byte array in little endian.
Dyn Compatibility§
This trait isnotdyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.