Struct ra_ap_rustc_index::bit_set::SparseBitSet
source · pub struct SparseBitSet<T> { /* private fields */ }
Expand description
A fixed-size bitset type with a sparse representation and a maximum of
SPARSE_MAX
elements. The elements are stored as a sorted ArrayVec
with
no duplicates.
This type is used by HybridBitSet
; do not use directly.
Implementations§
source§impl<T: Idx> SparseBitSet<T>
impl<T: Idx> SparseBitSet<T>
sourcepub fn union<Rhs>(&mut self, other: &Rhs) -> boolwhere
Self: BitRelations<Rhs>,
pub fn union<Rhs>(&mut self, other: &Rhs) -> boolwhere
Self: BitRelations<Rhs>,
Sets self = self | other
and returns true
if self
changed
(i.e., if new bits were added).
sourcepub fn subtract<Rhs>(&mut self, other: &Rhs) -> boolwhere
Self: BitRelations<Rhs>,
pub fn subtract<Rhs>(&mut self, other: &Rhs) -> boolwhere
Self: BitRelations<Rhs>,
Sets self = self - other
and returns true
if self
changed.
(i.e., if any bits were removed).
sourcepub fn intersect<Rhs>(&mut self, other: &Rhs) -> boolwhere
Self: BitRelations<Rhs>,
pub fn intersect<Rhs>(&mut self, other: &Rhs) -> boolwhere
Self: BitRelations<Rhs>,
Sets self = self & other
and return true
if self
changed.
(i.e., if any bits were removed).
source§impl<T: Idx + Ord> SparseBitSet<T>
impl<T: Idx + Ord> SparseBitSet<T>
pub fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T>
Trait Implementations§
source§impl<T: Clone> Clone for SparseBitSet<T>
impl<T: Clone> Clone for SparseBitSet<T>
source§fn clone(&self) -> SparseBitSet<T>
fn clone(&self) -> SparseBitSet<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T> RefUnwindSafe for SparseBitSet<T>where
T: RefUnwindSafe,
impl<T> Send for SparseBitSet<T>where
T: Send,
impl<T> Sync for SparseBitSet<T>where
T: Sync,
impl<T> Unpin for SparseBitSet<T>where
T: Unpin,
impl<T> UnwindSafe for SparseBitSet<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more