[−][src]Struct specs::prelude::BitSet
A BitSet
is a simple set designed to track which indices are placed
into it.
Note, a BitSet
is limited by design to only usize**4
indices.
Adding beyond this limit will cause the BitSet
to panic.
Methods
impl BitSet
[src][−]
pub fn new() -> BitSet
[src][−]
Creates an empty BitSet
.
pub fn with_capacity(max: u32) -> BitSet
[src][−]
Creates an empty BitSet
, preallocated for up to max
indices.
pub fn add(&mut self, id: u32) -> bool
[src][−]
Adds id
to the BitSet
. Returns true
if the value was
already in the set.
pub fn remove(&mut self, id: u32) -> bool
[src][−]
Removes id
from the set, returns true
if the value
was removed, and false
if the value was not set
to begin with.
pub fn contains(&self, id: u32) -> bool
[src][−]
Returns true
if id
is in the set.
pub fn contains_set(&self, other: &BitSet) -> bool
[src][−]
Returns true
if all ids in other
are contained in this set
pub fn clear(&mut self)
[src][−]
Completely wipes out the bit set.
Trait Implementations
impl<'a, T> BitOr<T> for &'a BitSet where
T: BitSetLike,
[src][+]
T: BitSetLike,
impl<T> BitOr<T> for BitSet where
T: BitSetLike,
[src][+]
T: BitSetLike,
impl<'a> Extend<&'a u32> for BitSet
[src][+]
impl Extend<u32> for BitSet
[src][+]
impl<'a, B> BitOrAssign<&'a B> for BitSet where
B: BitSetLike,
[src][+]
B: BitSetLike,
impl Default for BitSet
[src][+]
impl IntoIterator for BitSet
[src][+]
impl<'a> IntoIterator for &'a BitSet
[src][+]
impl DrainableBitSet for BitSet
[src][+]
impl Eq for BitSet
[src]
impl<'a> FromIterator<&'a u32> for BitSet
[src][+]
impl FromIterator<u32> for BitSet
[src][+]
impl<'a> Not for &'a BitSet
[src][+]
impl Not for BitSet
[src][+]
impl Debug for BitSet
[src][+]
impl Clone for BitSet
[src][+]
impl<T> BitXor<T> for BitSet where
T: BitSetLike,
[src][+]
T: BitSetLike,
impl<'a, T> BitXor<T> for &'a BitSet where
T: BitSetLike,
[src][+]
T: BitSetLike,
impl PartialEq<BitSet> for BitSet
[src][+]
impl<'a, B> BitAndAssign<&'a B> for BitSet where
B: BitSetLike,
[src][+]
B: BitSetLike,
impl<'a, T> BitAnd<T> for &'a BitSet where
T: BitSetLike,
[src][+]
T: BitSetLike,
impl<T> BitAnd<T> for BitSet where
T: BitSetLike,
[src][+]
T: BitSetLike,
impl<'a, B> BitXorAssign<&'a B> for BitSet where
B: BitSetLike,
[src][+]
B: BitSetLike,
impl BitSetLike for BitSet
[src][+]
impl ParJoin for BitSet
[src][+]
impl<'a> ParJoin for &'a BitSet
[src][+]
impl Join for BitSet
[src][+]
impl<'a> Join for &'a BitSet
[src][+]
Auto Trait Implementations
impl Unpin for BitSet
impl Sync for BitSet
impl Send for BitSet
impl UnwindSafe for BitSet
impl RefUnwindSafe for BitSet
Blanket Implementations
impl<T> TryDefault for T where
T: Default,
[src][+]
T: Default,
impl<I> IntoIterator for I where
I: Iterator,
[src][+]
I: Iterator,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Resource for T where
T: Any + Send + Sync,
[src]
T: Any + Send + Sync,
impl<T> Any for T where
T: Any,
[src][+]
T: Any,
impl<T> Event for T where
T: Send + Sync + 'static,
[src]
T: Send + Sync + 'static,