pub unsafe trait ToBitMask: Sealed {
type BitMask;
fn to_bitmask(self) -> Self::BitMask;
fn from_bitmask(bitmask: Self::BitMask) -> Self;
}
Expand description
Converts masks to and from integer bitmasks.
Each bit of the bitmask corresponds to a mask lane, starting with the LSB.
Safety
This trait is unsafe
and sealed, since the BitMask
type must match the number of lanes in
the mask.