pub trait BitBlockElement:
Not<Output = Self>
+ BitAnd<Output = Self>
+ BitOr<Output = Self>
+ BitXor<Output = Self>
+ Shl<u32, Output = Self>
+ Shr<u32, Output = Self>
+ BitAndAssign
+ BitOrAssign
+ Add<Output = Self>
+ Sub<Output = Self>
+ PartialEq
+ Sized
+ Copy
+ Clone
+ Binary
+ Default {
const BIT_WIDTH: usize;
const ZERO: Self;
const ONE: Self;
const MAX: Self;
// Required methods
fn count_ones(self) -> u32;
fn leading_zeros(self) -> u32;
fn wrapping_shl(self, rhs: u32) -> Self;
fn wrapping_shr(self, rhs: u32) -> Self;
fn clear_high_bits(self, rhs: u32) -> Self;
fn clear_low_bits(self, rhs: u32) -> Self;
}Required Associated Constants§
Required Methods§
fn count_ones(self) -> u32
fn leading_zeros(self) -> u32
fn wrapping_shl(self, rhs: u32) -> Self
fn wrapping_shr(self, rhs: u32) -> Self
fn clear_high_bits(self, rhs: u32) -> Self
fn clear_low_bits(self, rhs: u32) -> Self
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.