Struct compacts::bits::Set [−][src]
pub struct Set { /* fields omitted */ }
Set is a set of u32
.
Methods
impl Set
[src]
impl Set
pub fn write_to<W: Write>(&self, write: W) -> Result<()>
[src]
pub fn write_to<W: Write>(&self, write: W) -> Result<()>
pub fn read_from<R: Read>(read: R) -> Result<Self>
[src]
pub fn read_from<R: Read>(read: R) -> Result<Self>
impl Set
[src]
impl Set
pub fn new() -> Self
[src]
pub fn new() -> Self
pub fn clear(&mut self)
[src]
pub fn clear(&mut self)
pub fn get(&self, x: u32) -> bool
[src]
pub fn get(&self, x: u32) -> bool
pub fn put(&mut self, x: u32, enabled: bool) -> bool
[src]
pub fn put(&mut self, x: u32, enabled: bool) -> bool
pub fn insert(&mut self, x: u32) -> bool
[src]
pub fn insert(&mut self, x: u32) -> bool
pub fn remove(&mut self, x: u32) -> bool
[src]
pub fn remove(&mut self, x: u32) -> bool
pub fn shrink(&mut self)
[src]
pub fn shrink(&mut self)
impl Set
[src]
impl Set
ⓘImportant traits for And<'a, L, R>pub fn and<'a, T>(&'a self, that: T) -> And<'a, SetEntries<'a>, T::IntoIter> where
T: IntoIterator<Item = Cow<'a, Entry>>,
[src]
pub fn and<'a, T>(&'a self, that: T) -> And<'a, SetEntries<'a>, T::IntoIter> where
T: IntoIterator<Item = Cow<'a, Entry>>,
ⓘImportant traits for Or<'a, L, R>pub fn or<'a, T>(&'a self, that: T) -> Or<'a, SetEntries<'a>, T::IntoIter> where
T: IntoIterator<Item = Cow<'a, Entry>>,
[src]
pub fn or<'a, T>(&'a self, that: T) -> Or<'a, SetEntries<'a>, T::IntoIter> where
T: IntoIterator<Item = Cow<'a, Entry>>,
ⓘImportant traits for AndNot<'a, L, R>pub fn and_not<'a, T>(
&'a self,
that: T
) -> AndNot<'a, SetEntries<'a>, T::IntoIter> where
T: IntoIterator<Item = Cow<'a, Entry>>,
[src]
pub fn and_not<'a, T>(
&'a self,
that: T
) -> AndNot<'a, SetEntries<'a>, T::IntoIter> where
T: IntoIterator<Item = Cow<'a, Entry>>,
ⓘImportant traits for Xor<'a, L, R>pub fn xor<'a, T>(&'a self, that: T) -> Xor<'a, SetEntries<'a>, T::IntoIter> where
T: IntoIterator<Item = Cow<'a, Entry>>,
[src]
pub fn xor<'a, T>(&'a self, that: T) -> Xor<'a, SetEntries<'a>, T::IntoIter> where
T: IntoIterator<Item = Cow<'a, Entry>>,
pub fn bits<'a>(
&'a self
) -> impl Iterator<Item = u32> + 'a
[src]
pub fn bits<'a>(
&'a self
) -> impl Iterator<Item = u32> + 'a
Trait Implementations
impl Debug for Set
[src]
impl Debug for Set
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Set
[src]
impl Clone for Set
fn clone(&self) -> Set
[src]
fn clone(&self) -> Set
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for Set
[src]
impl Default for Set
impl PartialEq for Set
[src]
impl PartialEq for Set
fn eq(&self, other: &Set) -> bool
[src]
fn eq(&self, other: &Set) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Set) -> bool
[src]
fn ne(&self, other: &Set) -> bool
This method tests for !=
.
impl Eq for Set
[src]
impl Eq for Set
impl<'a> IntoIterator for &'a Set
[src]
impl<'a> IntoIterator for &'a Set
type Item = Cow<'a, Entry>
The type of the elements being iterated over.
type IntoIter = SetEntries<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl<T: AsRef<[u32]>> From<T> for Set
[src]
impl<T: AsRef<[u32]>> From<T> for Set
impl<'a> FromIterator<Entry> for Set
[src]
impl<'a> FromIterator<Entry> for Set
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = Entry>,
[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = Entry>,
Creates a value from an iterator. Read more
impl<'a> FromIterator<Cow<'a, Entry>> for Set
[src]
impl<'a> FromIterator<Cow<'a, Entry>> for Set
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = Cow<'a, Entry>>,
[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = Cow<'a, Entry>>,
Creates a value from an iterator. Read more
impl Index<u32> for Set
[src]
impl Index<u32> for Set
type Output = bool
The returned type after indexing.
fn index(&self, i: u32) -> &Self::Output
[src]
fn index(&self, i: u32) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl PopCount<u64> for Set
[src]
impl PopCount<u64> for Set
const MAX_BOUND: u64
MAX_BOUND: u64 = 1 << 32
fn count1(&self) -> u64
[src]
fn count1(&self) -> u64
fn count0(&self) -> T where
T: Sub<Output = T>,
[src]
fn count0(&self) -> T where
T: Sub<Output = T>,
impl Rank<u32> for Set
[src]
impl Rank<u32> for Set
fn rank1(&self, i: u32) -> u32
[src]
fn rank1(&self, i: u32) -> u32
Returns occurences of non-zero bit in [0, i)
. rank1(i)
should be equal to i - self.rank0(i)
. Read more
fn rank0(&self, i: T) -> T where
T: Sub<Output = T> + Copy,
[src]
fn rank0(&self, i: T) -> T where
T: Sub<Output = T> + Copy,
Returns occurences of zero bit in [0, i)
. rank0(i)
should be equal to i - self.rank1(i)
. Read more
impl Select1<u32> for Set
[src]
impl Select1<u32> for Set
fn select1(&self, c: u32) -> Option<u32>
[src]
fn select1(&self, c: u32) -> Option<u32>
Returns the position of 'c+1'th appearance of non-zero bit.
impl Select0<u32> for Set
[src]
impl Select0<u32> for Set