Struct rinecs::operators::HasOption [−][src]
pub struct HasOption<T: 'static> { /* fields omitted */ }
Operator that matches every entity no matter if it has the component or not but doesn’t give access to the component, only returns a boolean specifying if the component is present or not.
This doesn’t lock the accessed component so it can be used in parallel even with write access operators
for (has_pos, vel) in entities.iter_for::<(HasOption<Position>, Read<Velocity>)>(){ if has_pos { // ... } }
Will select all entities that optionally have Position and have a Velocity component pos will be false for those that don’t have Position
Trait Implementations
impl<T: 'static> DataAccesses for HasOption<T>
[src]
impl<T: 'static> DataAccesses for HasOption<T>
[src]impl<'a, T: 'static> FromComponent<'a, bool> for HasOption<T>
[src]
impl<'a, T: 'static> FromComponent<'a, bool> for HasOption<T>
[src]fn from_component(has: bool) -> HasOption<T>
[src]
impl<'a, T: 'static> UnorderedData<'a> for HasOption<T>
[src]
impl<'a, T: 'static> UnorderedData<'a> for HasOption<T>
[src]type Iter = IterHasOption<'a, T>
type IterMut = IterHasOption<'a, T>
type Components = T
type ComponentsRef = bool
type Storage = StorageHasOption<'a, T>
fn query_mask<E: EntitiesStorage>(_: &E) -> Bitmask
[src]
fn into_iter<E: EntitiesStorage>(entities: &'a E) -> Self::Iter
[src]
fn into_iter_mut<E: EntitiesStorage>(entities: &'a E) -> Self::Iter
[src]
fn storage<E: EntitiesStorage>(entities: &'a E) -> Option<Self::Storage>
[src]
impl<T> SafeIter<'_> for HasOption<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for HasOption<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for HasOption<T> where
T: Send,
T: Send,
impl<T> Sync for HasOption<T> where
T: Sync,
T: Sync,
impl<T> Unpin for HasOption<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for HasOption<T> where
T: UnwindSafe,
T: UnwindSafe,