Struct rin::ecs::ReadAndParentRef [−][src]
pub struct ReadAndParentRef<'a, T, Ref> { /* fields omitted */ }
Operator over hierarchical components that will select an entity’s component for read only and apply another operator on it’s parent
#[derive(HierarchicalComponent, Debug)] struct Position{x: f32, y: f32} #[derive(Component, Debug)] struct Velocity{x: f32, y: f32}; let iter = entities.ordered_iter_for::<ReadAndParentRef<Position, Read<Velocity>>>(); for (pos, parent_vel) in iter { }
Trait Implementations
impl<'a, T, Ref> OrderedData<'a> for ReadAndParentRef<'a, T, Ref> where
Ref: UnorderedData<'a>,
T: ComponentSend,
<T as Component>::Storage: for<'b> HierarchicalStorage<'b, T>,
ReadGuardRef<'b, <T as Component>::Storage>: for<'b> IntoHierarchicalIter<'b, T>,
[src]
impl<'a, T, Ref> OrderedData<'a> for ReadAndParentRef<'a, T, Ref> where
Ref: UnorderedData<'a>,
T: ComponentSend,
<T as Component>::Storage: for<'b> HierarchicalStorage<'b, T>,
ReadGuardRef<'b, <T as Component>::Storage>: for<'b> IntoHierarchicalIter<'b, T>,
[src]type Iter = ReadAndParentRefIter<'a, ReadGuardRef<'a, <T as Component>::Storage>, T, Ref, <Ref as UnorderedData<'a>>::Storage>
type Components = T
type ComponentsRef = (&'a T, Option<<Ref as UnorderedData<'a>>::ComponentsRef>)
type Storage = ParentStorageReadRef<'a, ReadGuardRef<'a, <T as Component>::Storage>, T, Ref, <Ref as UnorderedData<'a>>::Storage>
pub fn query_mask<E>(entities: &E) -> Bitmask where
E: EntitiesStorage,
[src]
E: EntitiesStorage,
pub fn into_iter<E>(
entities: &'a E
) -> <ReadAndParentRef<'a, T, Ref> as OrderedData<'a>>::Iter where
E: EntitiesStorage,
[src]
entities: &'a E
) -> <ReadAndParentRef<'a, T, Ref> as OrderedData<'a>>::Iter where
E: EntitiesStorage,
pub fn storage<E>(
entities: &'a E
) -> Option<<ReadAndParentRef<'a, T, Ref> as OrderedData<'a>>::Storage> where
E: EntitiesStorage,
[src]
entities: &'a E
) -> Option<<ReadAndParentRef<'a, T, Ref> as OrderedData<'a>>::Storage> where
E: EntitiesStorage,
pub fn ordered_ids<S, E>(
entities: &'a E,
query_mask: Bitmask,
unordered_storage: &S
) -> OrderedIndexGuard<'a> where
E: EntitiesStorage,
S: FastIndexExt,
[src]
entities: &'a E,
query_mask: Bitmask,
unordered_storage: &S
) -> OrderedIndexGuard<'a> where
E: EntitiesStorage,
S: FastIndexExt,
Auto Trait Implementations
impl<'a, T, Ref> RefUnwindSafe for ReadAndParentRef<'a, T, Ref> where
Ref: RefUnwindSafe,
T: RefUnwindSafe,
Ref: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, Ref> Send for ReadAndParentRef<'a, T, Ref> where
Ref: Send,
T: Sync,
Ref: Send,
T: Sync,
impl<'a, T, Ref> Sync for ReadAndParentRef<'a, T, Ref> where
Ref: Sync,
T: Sync,
Ref: Sync,
T: Sync,
impl<'a, T, Ref> Unpin for ReadAndParentRef<'a, T, Ref> where
Ref: Unpin,
Ref: Unpin,
impl<'a, T, Ref> UnwindSafe for ReadAndParentRef<'a, T, Ref> where
Ref: UnwindSafe,
T: RefUnwindSafe,
Ref: UnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]