Trait BitSetLike
pub trait BitSetLike: Clone + Debug {
// Required methods
fn new_bitset(max: usize) -> Self;
fn len(&self) -> usize;
fn test(&self, ix: usize) -> bool;
fn set(&mut self, ix: usize);
fn clear(&mut self, ix: usize);
// Provided method
fn count(&self) -> usize { ... }
}Expand description
Trait for types which can be handled with BitSetStrategy.
Required Methods§
fn new_bitset(max: usize) -> Self
fn new_bitset(max: usize) -> Self
Create a new value of Self with space for up to max bits, all
initialised to zero.
Provided 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.
Implementations on Foreign Types§
§impl BitSetLike for i8
impl BitSetLike for i8
§impl BitSetLike for i16
impl BitSetLike for i16
§impl BitSetLike for i32
impl BitSetLike for i32
§impl BitSetLike for i64
impl BitSetLike for i64
§impl BitSetLike for isize
impl BitSetLike for isize
§impl BitSetLike for u8
impl BitSetLike for u8
§impl BitSetLike for u16
impl BitSetLike for u16
§impl BitSetLike for u32
impl BitSetLike for u32
§impl BitSetLike for u64
impl BitSetLike for u64
§impl BitSetLike for usize
impl BitSetLike for usize
§impl BitSetLike for Vec<bool>
impl BitSetLike for Vec<bool>
§impl BitSetLike for BitSet
Available on crate feature bit-set only.
impl BitSetLike for BitSet
Available on crate feature
bit-set only.