pub struct Read<T>(/* private fields */)
where
T: Component;Expand description
Reads a single entity data component type from a chunk.
Trait Implementations§
impl<T> Copy for Read<T>where
T: Component,
Source§impl<'a, T> DefaultFilter for Read<T>where
T: Component,
impl<'a, T> DefaultFilter for Read<T>where
T: Component,
Source§type Filter = EntityFilterTuple<ComponentFilter<T>, Passthrough, Passthrough>
type Filter = EntityFilterTuple<ComponentFilter<T>, Passthrough, Passthrough>
The type of entity filter constructed.
Source§impl<T> ResourceSet for Read<T>where
T: Resource,
impl<T> ResourceSet for Read<T>where
T: Resource,
type PreparedResources = PreparedRead<T>
Source§unsafe fn fetch_unchecked(
resources: &Resources,
) -> <Read<T> as ResourceSet>::PreparedResources
unsafe fn fetch_unchecked( resources: &Resources, ) -> <Read<T> as ResourceSet>::PreparedResources
Fetches all defined resources, without checking mutability. Read more
fn fetch_mut(resources: &mut Resources) -> Self::PreparedResources
fn fetch(resources: &Resources) -> Self::PreparedResourceswhere
Self: ReadOnly,
Source§impl<'a, T> View<'a> for Read<T>where
T: Component,
impl<'a, T> View<'a> for Read<T>where
T: Component,
Source§fn fetch(
_: &'a ArchetypeData,
chunk: &'a ComponentStorage,
_: ChunkIndex,
_: SetIndex,
) -> <Read<T> as View<'a>>::Iter
fn fetch( _: &'a ArchetypeData, chunk: &'a ComponentStorage, _: ChunkIndex, _: SetIndex, ) -> <Read<T> as View<'a>>::Iter
Pulls data out of a chunk.
Source§fn reads<D>() -> boolwhere
D: Component,
fn reads<D>() -> boolwhere
D: Component,
Determines if the view reads the specified data type.
Source§fn writes<D>() -> boolwhere
D: Component,
fn writes<D>() -> boolwhere
D: Component,
Determines if the view writes to the specified data type.
Source§fn validate_access(access: &ComponentAccess<'_>) -> bool
fn validate_access(access: &ComponentAccess<'_>) -> bool
Determines if the given component access includes all permissions required by the view.
Source§fn requires_permissions() -> Permissions<ComponentTypeId>
fn requires_permissions() -> Permissions<ComponentTypeId>
Returns the set of permissions required by the view.
Auto Trait Implementations§
impl<T> Freeze for Read<T>
impl<T> RefUnwindSafe for Read<T>where
T: RefUnwindSafe,
impl<T> Send for Read<T>
impl<T> Sync for Read<T>
impl<T> Unpin for Read<T>where
T: Unpin,
impl<T> UnsafeUnpin for Read<T>
impl<T> UnwindSafe for Read<T>where
T: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Component for T
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>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<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>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> 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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.