pub enum InvertibleComponentIdSet {
Included(ComponentIdSet),
Excluded(ComponentIdSet),
}Expand description
A set of bits that is either a finite set, or the set complement of a finite set.
Variants§
Included(ComponentIdSet)
A finite InvertibleComponentIdSet that includes all components in the inner set.
Excluded(ComponentIdSet)
An unbounded InvertibleComponentIdSet that includes all components not in the inner set.
Implementations§
Source§impl InvertibleComponentIdSet
impl InvertibleComponentIdSet
Sourcepub fn insert(&mut self, index: ComponentId)
pub fn insert(&mut self, index: ComponentId)
Adds a ComponentId to the set.
Sourcepub fn remove(&mut self, index: ComponentId)
pub fn remove(&mut self, index: ComponentId)
Removes a ComponentId from the set.
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Removes all ComponentIds from the set.
Sourcepub fn all(&mut self)
pub fn all(&mut self)
Adds all ComponentIds to the set.
Sourcepub fn contains(&self, index: ComponentId) -> bool
pub fn contains(&self, index: ComponentId) -> bool
Returns true if the ComponentId is in the set.
Sourcepub fn is_clear(&self) -> bool
pub fn is_clear(&self) -> bool
Returns true if the set is empty.
Note that an unbounded set is never clear.
Sourcepub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true if the set contains all components.
Note that a finite set is never fully set.
Sourcepub fn is_unbounded(&self) -> bool
pub fn is_unbounded(&self) -> bool
Returns true if this is an unbounded set, or false if it is a finite set.
Sourcepub fn into_finite_set(self) -> Option<ComponentIdSet>
pub fn into_finite_set(self) -> Option<ComponentIdSet>
If this is a finite set, returns the set.
If this is an unbounded set, returns None.
Sourcepub fn as_finite_set(&self) -> Option<&ComponentIdSet>
pub fn as_finite_set(&self) -> Option<&ComponentIdSet>
If this is a finite set, returns the set.
If this is an unbounded set, returns None.
Sourcepub fn as_exclusion_set(&self) -> Option<&ComponentIdSet>
pub fn as_exclusion_set(&self) -> Option<&ComponentIdSet>
If this is an unbounded set, returns the set of components
that are excluded from the set.
If this is a finite set, returns None.
Sourcepub fn union_with(&mut self, other: &Self)
pub fn union_with(&mut self, other: &Self)
In-place union of two sets.
Sourcepub fn difference_with(&mut self, other: &Self)
pub fn difference_with(&mut self, other: &Self)
In-place difference of two sets.
Sourcepub fn difference(&self, other: &Self) -> Self
pub fn difference(&self, other: &Self) -> Self
Returns the set difference of two sets.
Sourcepub fn intersect_with(&mut self, other: &Self)
pub fn intersect_with(&mut self, other: &Self)
In-place intersection of two sets.
Sourcepub fn intersection(&self, other: &Self) -> Self
pub fn intersection(&self, other: &Self) -> Self
Returns the intersection of two sets.
Sourcepub fn is_disjoint(&self, other: &Self) -> bool
pub fn is_disjoint(&self, other: &Self) -> bool
Returns true if self has no elements in common with other.
This is equivalent to checking for an empty intersection.
Trait Implementations§
Source§impl Clone for InvertibleComponentIdSet
impl Clone for InvertibleComponentIdSet
Source§fn clone(&self) -> InvertibleComponentIdSet
fn clone(&self) -> InvertibleComponentIdSet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InvertibleComponentIdSet
impl Debug for InvertibleComponentIdSet
Source§impl Default for InvertibleComponentIdSet
impl Default for InvertibleComponentIdSet
impl Eq for InvertibleComponentIdSet
Source§impl PartialEq for InvertibleComponentIdSet
impl PartialEq for InvertibleComponentIdSet
impl StructuralPartialEq for InvertibleComponentIdSet
Auto Trait Implementations§
impl Freeze for InvertibleComponentIdSet
impl RefUnwindSafe for InvertibleComponentIdSet
impl Send for InvertibleComponentIdSet
impl Sync for InvertibleComponentIdSet
impl Unpin for InvertibleComponentIdSet
impl UnsafeUnpin for InvertibleComponentIdSet
impl UnwindSafe for InvertibleComponentIdSet
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FromTemplate for T
impl<T> FromTemplate for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.