pub trait BitMask {
const LEN: usize;
// Required methods
fn first_offset(&self) -> usize;
fn before(&self, rhs: &Self) -> bool;
fn as_little_endian(&self) -> Self;
fn all_zero(&self) -> bool;
fn clear_high_bits(&self, n: usize) -> Self;
}
Expand description
Trait for the bitmask of a vector Mask.
Required Associated Constants§
Required Methods§
Sourcefn first_offset(&self) -> usize
fn first_offset(&self) -> usize
get the offset of the first 1
bit.
Sourcefn as_little_endian(&self) -> Self
fn as_little_endian(&self) -> Self
convert bitmask as little endian
Sourcefn clear_high_bits(&self, n: usize) -> Self
fn clear_high_bits(&self, n: usize) -> Self
clear high n bits.
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.