Skip to main content

Bytes

Trait Bytes 

Source
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§

Source

fn to_bytes(self) -> Self::Bytes

Convert this type to an array of bytes.

Source

fn from_bytes(value: Self::Bytes) -> Self

Create an instance of this type from an array of bytes.

Provided Methods§

Source

fn bitcast<U: Bytes<Bytes = Self::Bytes>>(self) -> U

Bitcast directly from this type to another one of the same size.

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.

Implementors§

Source§

impl<S: Simd> Bytes for f32x4<S>

Source§

impl<S: Simd> Bytes for f32x8<S>

Source§

impl<S: Simd> Bytes for f32x16<S>

Source§

impl<S: Simd> Bytes for f64x2<S>

Source§

impl<S: Simd> Bytes for f64x4<S>

Source§

impl<S: Simd> Bytes for f64x8<S>

Source§

impl<S: Simd> Bytes for i8x16<S>

Source§

impl<S: Simd> Bytes for i8x32<S>

Source§

impl<S: Simd> Bytes for i8x64<S>

Source§

impl<S: Simd> Bytes for i16x8<S>

Source§

impl<S: Simd> Bytes for i16x16<S>

Source§

impl<S: Simd> Bytes for i16x32<S>

Source§

impl<S: Simd> Bytes for i32x4<S>

Source§

impl<S: Simd> Bytes for i32x8<S>

Source§

impl<S: Simd> Bytes for i32x16<S>

Source§

impl<S: Simd> Bytes for mask8x16<S>

Source§

impl<S: Simd> Bytes for mask8x32<S>

Source§

impl<S: Simd> Bytes for mask8x64<S>

Source§

impl<S: Simd> Bytes for mask16x8<S>

Source§

impl<S: Simd> Bytes for mask16x16<S>

Source§

impl<S: Simd> Bytes for mask16x32<S>

Source§

impl<S: Simd> Bytes for mask32x4<S>

Source§

impl<S: Simd> Bytes for mask32x8<S>

Source§

impl<S: Simd> Bytes for mask32x16<S>

Source§

impl<S: Simd> Bytes for mask64x2<S>

Source§

impl<S: Simd> Bytes for mask64x4<S>

Source§

impl<S: Simd> Bytes for mask64x8<S>

Source§

impl<S: Simd> Bytes for u8x16<S>

Source§

impl<S: Simd> Bytes for u8x32<S>

Source§

impl<S: Simd> Bytes for u8x64<S>

Source§

impl<S: Simd> Bytes for u16x8<S>

Source§

impl<S: Simd> Bytes for u16x16<S>

Source§

impl<S: Simd> Bytes for u16x32<S>

Source§

impl<S: Simd> Bytes for u32x4<S>

Source§

impl<S: Simd> Bytes for u32x8<S>

Source§

impl<S: Simd> Bytes for u32x16<S>