pub trait BitField:
BitAnd<Output = Self>
+ BitOr<Output = Self>
+ Not<Output = Self>
+ Sized
+ Copy {
// Required methods
fn empty() -> Self;
fn set_bit(&mut self, n: usize, state: bool);
fn get_bit(&self, n: usize) -> bool;
fn n_bits() -> usize;
}
Expand description
A trait for a type that can work as a bitfield.
Required Methods§
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.