pub struct QueryState<Q: WorldQuery, F: ReadOnlyWorldQuery> { /* private fields */ }
Implementations§
Source§impl<Q: WorldQuery, F: ReadOnlyWorldQuery> QueryState<Q, F>
impl<Q: WorldQuery, F: ReadOnlyWorldQuery> QueryState<Q, F>
pub fn new(world: &mut World) -> Self
pub fn get_entities(&self, world: &World) -> EntityIdSet
pub fn contains(&self, world: &World, entity: Entity) -> bool
pub fn as_readonly(&self) -> &QueryState<Q::ReadOnly, F::ReadOnly>
Sourcepub unsafe fn as_transmuted_state<NQ, NF>(&self) -> &QueryState<NQ, NF>
pub unsafe fn as_transmuted_state<NQ, NF>(&self) -> &QueryState<NQ, NF>
§Safety
NQ
must have a subset of the access ofQ
.NF
must have a subset of the access ofF
.
Sourcepub unsafe fn get_unchecked_manual<'w>(
&self,
world: &'w World,
entity: Entity,
last_change_tick: u32,
change_tick: u32,
) -> Option<Q::Item<'w>>
pub unsafe fn get_unchecked_manual<'w>( &self, world: &'w World, entity: Entity, last_change_tick: u32, change_tick: u32, ) -> Option<Q::Item<'w>>
§Safety
world
must be the same world that was used to create thisQueryState
.
Source§impl<Q: WorldQuery, F: ReadOnlyWorldQuery> QueryState<Q, F>
impl<Q: WorldQuery, F: ReadOnlyWorldQuery> QueryState<Q, F>
pub fn validate_world(&self, world: &World)
pub fn debug_validate_world(&self, world: &World)
pub fn get<'w>( &self, world: &'w World, entity: Entity, ) -> Option<ReadOnlyQueryItem<'w, Q>>
pub fn get_mut<'w>( &mut self, world: &'w mut World, entity: Entity, ) -> Option<QueryItem<'w, Q>>
Sourcepub unsafe fn iter_unchecked_manual<'w, 's>(
&'s self,
world: &'w World,
last_change_tick: u32,
change_tick: u32,
) -> QueryIter<'w, 's, Q, F> ⓘ
pub unsafe fn iter_unchecked_manual<'w, 's>( &'s self, world: &'w World, last_change_tick: u32, change_tick: u32, ) -> QueryIter<'w, 's, Q, F> ⓘ
§Safety
world
must be the same world that was used to create thisQueryState
.
pub fn iter<'w, 's>( &'s self, world: &'w World, ) -> QueryIter<'w, 's, Q::ReadOnly, F::ReadOnly> ⓘ
pub fn iter_mut<'w, 's>( &'s mut self, world: &'w mut World, ) -> QueryIter<'w, 's, Q, F> ⓘ
Trait Implementations§
Source§impl<'w, 's, Q, F> SystemParamFetch<'w, 's> for QueryState<Q, F>where
Q: WorldQuery + 'static,
F: ReadOnlyWorldQuery + 'static,
impl<'w, 's, Q, F> SystemParamFetch<'w, 's> for QueryState<Q, F>where
Q: WorldQuery + 'static,
F: ReadOnlyWorldQuery + 'static,
Source§impl<Q, F> SystemParamState for QueryState<Q, F>where
Q: WorldQuery + 'static,
F: ReadOnlyWorldQuery + 'static,
impl<Q, F> SystemParamState for QueryState<Q, F>where
Q: WorldQuery + 'static,
F: ReadOnlyWorldQuery + 'static,
Auto Trait Implementations§
impl<Q, F> Freeze for QueryState<Q, F>
impl<Q, F> RefUnwindSafe for QueryState<Q, F>
impl<Q, F> Send for QueryState<Q, F>
impl<Q, F> Sync for QueryState<Q, F>
impl<Q, F> Unpin for QueryState<Q, F>
impl<Q, F> UnwindSafe for QueryState<Q, F>
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> 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.