Struct rinecs::operators::HasOr[][src]

pub struct HasOr<T> { /* fields omitted */ }

Matches entities that have any of the passed components with read only access to those components

It returns an element per component being None those that don’t exist for that entity

for (has_pos, has_vel) in entities.iter_for::<HasOr<(Position, Velocity)>>(){
    if has_pos {
    }

    if has_vel {
    }
}

Matches all entities that have a Position a Velocity or both. pos and vel will be None for entities that don’t have Position or Velocity respectively

Trait Implementations

impl<T1, T2> DataAccesses for HasOr<(T1, T2)>[src]

impl<T1, T2, T3> DataAccesses for HasOr<(T1, T2, T3)>[src]

impl<T1, T2, T3, T4> DataAccesses for HasOr<(T1, T2, T3, T4)>[src]

impl<T1, T2, T3, T4, T5> DataAccesses for HasOr<(T1, T2, T3, T4, T5)>[src]

impl<T1, T2, T3, T4, T5, T6> DataAccesses for HasOr<(T1, T2, T3, T4, T5, T6)>[src]

impl<T1, T2, T3, T4, T5, T6, T7> DataAccesses for HasOr<(T1, T2, T3, T4, T5, T6, T7)>[src]

impl<T1, T2, T3, T4, T5, T6, T7, T8> DataAccesses for HasOr<(T1, T2, T3, T4, T5, T6, T7, T8)>[src]

impl<T1, T2, T3, T4, T5, T6, T7, T8> FromComponent<'_, (<T1 as Bools>::B, <T2 as Bools>::B, <T3 as Bools>::B, <T4 as Bools>::B, <T5 as Bools>::B, <T6 as Bools>::B, <T7 as Bools>::B, <T8 as Bools>::B)> for HasOr<(T1, T2, T3, T4, T5, T6, T7, T8)>[src]

impl<T1, T2, T3, T4, T5, T6, T7> FromComponent<'_, (<T1 as Bools>::B, <T2 as Bools>::B, <T3 as Bools>::B, <T4 as Bools>::B, <T5 as Bools>::B, <T6 as Bools>::B, <T7 as Bools>::B)> for HasOr<(T1, T2, T3, T4, T5, T6, T7)>[src]

impl<T1, T2, T3, T4, T5, T6> FromComponent<'_, (<T1 as Bools>::B, <T2 as Bools>::B, <T3 as Bools>::B, <T4 as Bools>::B, <T5 as Bools>::B, <T6 as Bools>::B)> for HasOr<(T1, T2, T3, T4, T5, T6)>[src]

impl<T1, T2, T3, T4, T5> FromComponent<'_, (<T1 as Bools>::B, <T2 as Bools>::B, <T3 as Bools>::B, <T4 as Bools>::B, <T5 as Bools>::B)> for HasOr<(T1, T2, T3, T4, T5)>[src]

impl<T1, T2, T3, T4> FromComponent<'_, (<T1 as Bools>::B, <T2 as Bools>::B, <T3 as Bools>::B, <T4 as Bools>::B)> for HasOr<(T1, T2, T3, T4)>[src]

impl<T1, T2, T3> FromComponent<'_, (<T1 as Bools>::B, <T2 as Bools>::B, <T3 as Bools>::B)> for HasOr<(T1, T2, T3)>[src]

impl<T1, T2> FromComponent<'_, (<T1 as Bools>::B, <T2 as Bools>::B)> for HasOr<(T1, T2)>[src]

impl<'a, T1: 'static, T2: 'static> UnorderedData<'a> for HasOr<(T1, T2)>[src]

type Iter = IntoIter2<'a, T1, T2>

type IterMut = IntoIter2<'a, T1, T2>

type Components = (T1, T2)

type ComponentsRef = (<T1 as Bools>::B, <T2 as Bools>::B)

type Storage = StorageRef2<'a, T1, T2, LazyIndexGuard<'a>>

impl<'a, T1: 'static, T2: 'static, T3: 'static> UnorderedData<'a> for HasOr<(T1, T2, T3)>[src]

type Iter = IntoIter3<'a, T1, T2, T3>

type IterMut = IntoIter3<'a, T1, T2, T3>

type Components = (T1, T2, T3)

type ComponentsRef = (<T1 as Bools>::B, <T2 as Bools>::B, <T3 as Bools>::B)

type Storage = StorageRef3<'a, T1, T2, T3, LazyIndexGuard<'a>>

impl<'a, T1: 'static, T2: 'static, T3: 'static, T4: 'static> UnorderedData<'a> for HasOr<(T1, T2, T3, T4)>[src]

type Iter = IntoIter4<'a, T1, T2, T3, T4>

type IterMut = IntoIter4<'a, T1, T2, T3, T4>

type Components = (T1, T2, T3, T4)

type ComponentsRef = (<T1 as Bools>::B, <T2 as Bools>::B, <T3 as Bools>::B, <T4 as Bools>::B)

type Storage = StorageRef4<'a, T1, T2, T3, T4, LazyIndexGuard<'a>>

impl<'a, T1: 'static, T2: 'static, T3: 'static, T4: 'static, T5: 'static> UnorderedData<'a> for HasOr<(T1, T2, T3, T4, T5)>[src]

type Iter = IntoIter5<'a, T1, T2, T3, T4, T5>

type IterMut = IntoIter5<'a, T1, T2, T3, T4, T5>

type Components = (T1, T2, T3, T4, T5)

type ComponentsRef = (<T1 as Bools>::B, <T2 as Bools>::B, <T3 as Bools>::B, <T4 as Bools>::B, <T5 as Bools>::B)

type Storage = StorageRef5<'a, T1, T2, T3, T4, T5, LazyIndexGuard<'a>>

impl<'a, T1: 'static, T2: 'static, T3: 'static, T4: 'static, T5: 'static, T6: 'static> UnorderedData<'a> for HasOr<(T1, T2, T3, T4, T5, T6)>[src]

type Iter = IntoIter6<'a, T1, T2, T3, T4, T5, T6>

type IterMut = IntoIter6<'a, T1, T2, T3, T4, T5, T6>

type Components = (T1, T2, T3, T4, T5, T6)

type ComponentsRef = (<T1 as Bools>::B, <T2 as Bools>::B, <T3 as Bools>::B, <T4 as Bools>::B, <T5 as Bools>::B, <T6 as Bools>::B)

type Storage = StorageRef6<'a, T1, T2, T3, T4, T5, T6, LazyIndexGuard<'a>>

impl<'a, T1: 'static, T2: 'static, T3: 'static, T4: 'static, T5: 'static, T6: 'static, T7: 'static> UnorderedData<'a> for HasOr<(T1, T2, T3, T4, T5, T6, T7)>[src]

type Iter = IntoIter7<'a, T1, T2, T3, T4, T5, T6, T7>

type IterMut = IntoIter7<'a, T1, T2, T3, T4, T5, T6, T7>

type Components = (T1, T2, T3, T4, T5, T6, T7)

type ComponentsRef = (<T1 as Bools>::B, <T2 as Bools>::B, <T3 as Bools>::B, <T4 as Bools>::B, <T5 as Bools>::B, <T6 as Bools>::B, <T7 as Bools>::B)

type Storage = StorageRef7<'a, T1, T2, T3, T4, T5, T6, T7, LazyIndexGuard<'a>>

impl<'a, T1: 'static, T2: 'static, T3: 'static, T4: 'static, T5: 'static, T6: 'static, T7: 'static, T8: 'static> UnorderedData<'a> for HasOr<(T1, T2, T3, T4, T5, T6, T7, T8)>[src]

type Iter = IntoIter8<'a, T1, T2, T3, T4, T5, T6, T7, T8>

type IterMut = IntoIter8<'a, T1, T2, T3, T4, T5, T6, T7, T8>

type Components = (T1, T2, T3, T4, T5, T6, T7, T8)

type ComponentsRef = (<T1 as Bools>::B, <T2 as Bools>::B, <T3 as Bools>::B, <T4 as Bools>::B, <T5 as Bools>::B, <T6 as Bools>::B, <T7 as Bools>::B, <T8 as Bools>::B)

type Storage = StorageRef8<'a, T1, T2, T3, T4, T5, T6, T7, T8, LazyIndexGuard<'a>>

impl<T1, T2> SafeIter<'_> for HasOr<(T1, T2)>[src]

impl<T1, T2, T3> SafeIter<'_> for HasOr<(T1, T2, T3)>[src]

impl<T1, T2, T3, T4> SafeIter<'_> for HasOr<(T1, T2, T3, T4)>[src]

impl<T1, T2, T3, T4, T5> SafeIter<'_> for HasOr<(T1, T2, T3, T4, T5)>[src]

impl<T1, T2, T3, T4, T5, T6> SafeIter<'_> for HasOr<(T1, T2, T3, T4, T5, T6)>[src]

impl<T1, T2, T3, T4, T5, T6, T7> SafeIter<'_> for HasOr<(T1, T2, T3, T4, T5, T6, T7)>[src]

impl<T1, T2, T3, T4, T5, T6, T7, T8> SafeIter<'_> for HasOr<(T1, T2, T3, T4, T5, T6, T7, T8)>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for HasOr<T> where
    T: RefUnwindSafe

impl<T> Send for HasOr<T> where
    T: Send

impl<T> Sync for HasOr<T> where
    T: Sync

impl<T> Unpin for HasOr<T> where
    T: Unpin

impl<T> UnwindSafe for HasOr<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.