pub trait BitChunk: Sealed + PrimInt<Output = Self, Output = Self> + NativeType + Binary + ShlAssign<Self> + Not + ShrAssign<usize> + ShlAssign<usize> + Shl<usize> + BitAndAssign<Self> {
fn to_ne_bytes(self) -> Self::Bytes;
fn from_ne_bytes(v: Self::Bytes) -> Self;
}
Expand description
A chunk of bits. This is used to create masks of a given length
whose width is 1
bit. In simd_packed
notation, this corresponds to m1xY
.
Required methods
fn to_ne_bytes(self) -> Self::Bytes
fn to_ne_bytes(self) -> Self::Bytes
convert itself into bytes.
fn from_ne_bytes(v: Self::Bytes) -> Self
fn from_ne_bytes(v: Self::Bytes) -> Self
convert itself from bytes.