pub trait BitRepr:
Copy
+ Eq
+ Ord
+ Hash
+ Default
+ Debug
+ Send
+ Sync
+ 'static
+ BitAnd<Output = Self>
+ BitAndAssign
+ BitOr<Output = Self>
+ BitOrAssign
+ Not<Output = Self>
+ Shl<usize, Output = Self>
+ Shr<usize, Output = Self>
+ ShrAssign<usize>
+ Add<Output = Self>
+ Sub<Output = Self> {
const BITS: usize;
const ZERO: Self;
const ONE: Self;
const MAX: Self;
// Required methods
fn count_ones(self) -> u32;
fn reverse_bits(self) -> Self;
fn to_usize(self) -> Option<usize>;
}Expand description
The unsigned word backing a BitSeq. Implemented for u8 … u128.
Required Associated Constants§
Required Methods§
fn count_ones(self) -> u32
fn reverse_bits(self) -> Self
fn to_usize(self) -> Option<usize>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".