pub struct ComponentIdSet(/* private fields */);Expand description
A set of ComponentIds.
Implementations§
Source§impl ComponentIdSet
impl ComponentIdSet
Sourcepub const fn new() -> ComponentIdSet
pub const fn new() -> ComponentIdSet
Create a new empty ComponentIdSet.
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 contains(&self, index: ComponentId) -> bool
pub fn contains(&self, index: ComponentId) -> bool
Returns true if the ComponentId is in the set.
Sourcepub fn is_disjoint(&self, other: &ComponentIdSet) -> bool
pub fn is_disjoint(&self, other: &ComponentIdSet) -> bool
Returns true if self has no elements in common with other. This
is equivalent to checking for an empty intersection.
Sourcepub fn is_subset(&self, other: &ComponentIdSet) -> bool
pub fn is_subset(&self, other: &ComponentIdSet) -> bool
Returns true if the set is a subset of another, i.e. other contains
at least all the values in self.
Sourcepub fn iter(&self) -> ComponentIdIter<Ones<'_>> ⓘ
pub fn iter(&self) -> ComponentIdIter<Ones<'_>> ⓘ
Iterates the ComponentIds in the set.
Sourcepub fn union<'a>(
&'a self,
other: &'a ComponentIdSet,
) -> ComponentIdIter<Union<'a>> ⓘ
pub fn union<'a>( &'a self, other: &'a ComponentIdSet, ) -> ComponentIdIter<Union<'a>> ⓘ
Returns a lazy iterator over the union of two ComponentIdSets.
Sourcepub fn intersection<'a>(
&'a self,
other: &'a ComponentIdSet,
) -> ComponentIdIter<Intersection<'a>> ⓘ
pub fn intersection<'a>( &'a self, other: &'a ComponentIdSet, ) -> ComponentIdIter<Intersection<'a>> ⓘ
Returns a lazy iterator over the intersection of two ComponentIdSets.
Sourcepub fn difference<'a>(
&'a self,
other: &'a ComponentIdSet,
) -> ComponentIdIter<Difference<'a>> ⓘ
pub fn difference<'a>( &'a self, other: &'a ComponentIdSet, ) -> ComponentIdIter<Difference<'a>> ⓘ
Returns a lazy iterator over the difference of two ComponentIdSets.
Sourcepub fn union_with(&mut self, other: &ComponentIdSet)
pub fn union_with(&mut self, other: &ComponentIdSet)
In-place union of two ComponentIdSets.
Sourcepub fn intersect_with(&mut self, other: &ComponentIdSet)
pub fn intersect_with(&mut self, other: &ComponentIdSet)
In-place intersection of two ComponentIdSets.
Sourcepub fn difference_with(&mut self, other: &ComponentIdSet)
pub fn difference_with(&mut self, other: &ComponentIdSet)
In-place difference of two ComponentIdSets.
Sourcepub fn difference_from(&mut self, other: &ComponentIdSet)
pub fn difference_from(&mut self, other: &ComponentIdSet)
In-place reversed difference of two ComponentIdSets.
This sets self to be other.difference(self).
Trait Implementations§
Source§impl Clone for ComponentIdSet
impl Clone for ComponentIdSet
Source§fn clone(&self) -> ComponentIdSet
fn clone(&self) -> ComponentIdSet
Source§fn clone_from(&mut self, source: &ComponentIdSet)
fn clone_from(&mut self, source: &ComponentIdSet)
source. Read moreSource§impl Debug for ComponentIdSet
impl Debug for ComponentIdSet
Source§impl Default for ComponentIdSet
impl Default for ComponentIdSet
Source§fn default() -> ComponentIdSet
fn default() -> ComponentIdSet
Source§impl Extend<ComponentId> for ComponentIdSet
impl Extend<ComponentId> for ComponentIdSet
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = ComponentId>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = ComponentId>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl From<ComponentIdSet> for AccessConflicts
impl From<ComponentIdSet> for AccessConflicts
Source§fn from(value: ComponentIdSet) -> AccessConflicts
fn from(value: ComponentIdSet) -> AccessConflicts
Source§impl FromIterator<ComponentId> for ComponentIdSet
impl FromIterator<ComponentId> for ComponentIdSet
Source§fn from_iter<T>(iter: T) -> ComponentIdSetwhere
T: IntoIterator<Item = ComponentId>,
fn from_iter<T>(iter: T) -> ComponentIdSetwhere
T: IntoIterator<Item = ComponentId>,
Source§impl Hash for ComponentIdSet
impl Hash for ComponentIdSet
Source§impl<'a> IntoIterator for &'a ComponentIdSet
impl<'a> IntoIterator for &'a ComponentIdSet
Source§type Item = ComponentId
type Item = ComponentId
Source§type IntoIter = ComponentIdIter<Ones<'a>>
type IntoIter = ComponentIdIter<Ones<'a>>
Source§fn into_iter(self) -> <&'a ComponentIdSet as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a ComponentIdSet as IntoIterator>::IntoIter
Source§impl IntoIterator for ComponentIdSet
impl IntoIterator for ComponentIdSet
Source§type Item = ComponentId
type Item = ComponentId
Source§type IntoIter = ComponentIdIter<IntoOnes>
type IntoIter = ComponentIdIter<IntoOnes>
Source§fn into_iter(self) -> <ComponentIdSet as IntoIterator>::IntoIter
fn into_iter(self) -> <ComponentIdSet as IntoIterator>::IntoIter
Source§impl PartialEq for ComponentIdSet
impl PartialEq for ComponentIdSet
impl Eq for ComponentIdSet
impl StructuralPartialEq for ComponentIdSet
Auto Trait Implementations§
impl Freeze for ComponentIdSet
impl RefUnwindSafe for ComponentIdSet
impl Send for ComponentIdSet
impl Sync for ComponentIdSet
impl Unpin for ComponentIdSet
impl UnsafeUnpin for ComponentIdSet
impl UnwindSafe for ComponentIdSet
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,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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.