pub struct QueryBorrowAny<T>(pub T);
Expand description
Query that borrows from components.
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<T> AsQuery for QueryBorrowAny<&T>where
T: ?Sized + 'static,
impl<T> AsQuery for QueryBorrowAny<&T>where
T: ?Sized + 'static,
Source§type Query = QueryBorrowAny<Read<T>>
type Query = QueryBorrowAny<Read<T>>
Associated query type.
Source§impl<T> AsQuery for QueryBorrowAny<&mut T>where
T: ?Sized + 'static,
impl<T> AsQuery for QueryBorrowAny<&mut T>where
T: ?Sized + 'static,
Source§type Query = QueryBorrowAny<Write<T>>
type Query = QueryBorrowAny<Write<T>>
Associated query type.
Source§impl<T> AsQuery for QueryBorrowAny<Read<T>>where
T: ?Sized + 'static,
impl<T> AsQuery for QueryBorrowAny<Read<T>>where
T: ?Sized + 'static,
Source§type Query = QueryBorrowAny<Read<T>>
type Query = QueryBorrowAny<Read<T>>
Associated query type.
Source§impl<T> AsQuery for QueryBorrowAny<Write<T>>where
T: ?Sized + 'static,
impl<T> AsQuery for QueryBorrowAny<Write<T>>where
T: ?Sized + 'static,
Source§type Query = QueryBorrowAny<Write<T>>
type Query = QueryBorrowAny<Write<T>>
Associated query type.
Source§impl<T: Clone> Clone for QueryBorrowAny<T>
impl<T: Clone> Clone for QueryBorrowAny<T>
Source§fn clone(&self) -> QueryBorrowAny<T>
fn clone(&self) -> QueryBorrowAny<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for QueryBorrowAny<T>
impl<T: Debug> Debug for QueryBorrowAny<T>
Source§impl<T: Default> Default for QueryBorrowAny<T>
impl<T: Default> Default for QueryBorrowAny<T>
Source§fn default() -> QueryBorrowAny<T>
fn default() -> QueryBorrowAny<T>
Returns the “default value” for a type. Read more
Source§impl<T> DefaultQuery for QueryBorrowAny<&T>where
T: ?Sized + 'static,
impl<T> DefaultQuery for QueryBorrowAny<&T>where
T: ?Sized + 'static,
Source§fn default_query() -> QueryBorrowAny<Read<T>>
fn default_query() -> QueryBorrowAny<Read<T>>
Returns default query instance.
Source§impl<T> DefaultQuery for QueryBorrowAny<&mut T>where
T: ?Sized + 'static,
impl<T> DefaultQuery for QueryBorrowAny<&mut T>where
T: ?Sized + 'static,
Source§fn default_query() -> QueryBorrowAny<Write<T>>
fn default_query() -> QueryBorrowAny<Write<T>>
Returns default query instance.
Source§impl<T> DefaultQuery for QueryBorrowAny<Read<T>>where
T: ?Sized + 'static,
impl<T> DefaultQuery for QueryBorrowAny<Read<T>>where
T: ?Sized + 'static,
Source§fn default_query() -> Self
fn default_query() -> Self
Returns default query instance.
Source§impl<T> DefaultQuery for QueryBorrowAny<Write<T>>where
T: ?Sized + 'static,
impl<T> DefaultQuery for QueryBorrowAny<Write<T>>where
T: ?Sized + 'static,
Source§fn default_query() -> Self
fn default_query() -> Self
Returns default query instance.
Source§impl<T> ImmutableQuery for QueryBorrowAny<Read<T>>where
T: ?Sized + 'static,
impl<T> ImmutableQuery for QueryBorrowAny<Read<T>>where
T: ?Sized + 'static,
Source§const CHECK_VALID: () = _
const CHECK_VALID: () = _
Checks that query is valid in compile time.
Source§impl<T> IntoQuery for QueryBorrowAny<Read<T>>where
T: ?Sized + 'static,
impl<T> IntoQuery for QueryBorrowAny<Read<T>>where
T: ?Sized + 'static,
Source§fn into_query(self) -> Self
fn into_query(self) -> Self
Converts into query.
Source§impl<T> IntoQuery for QueryBorrowAny<Write<T>>where
T: ?Sized + 'static,
impl<T> IntoQuery for QueryBorrowAny<Write<T>>where
T: ?Sized + 'static,
Source§fn into_query(self) -> Self
fn into_query(self) -> Self
Converts into query.
Source§impl<T> Query for QueryBorrowAny<Read<T>>where
T: ?Sized + 'static,
impl<T> Query for QueryBorrowAny<Read<T>>where
T: ?Sized + 'static,
Source§type Fetch<'a> = FetchBorrowAnyRead<'a, T>
type Fetch<'a> = FetchBorrowAnyRead<'a, T>
Fetch value type for this query type.
Contains data from one archetype.
Source§fn component_access(
&self,
comp: &ComponentInfo,
) -> Result<Option<Access>, WriteAlias>
fn component_access( &self, comp: &ComponentInfo, ) -> Result<Option<Access>, WriteAlias>
Returns what kind of access the query performs on the component type.
This method may return stronger access type if it is impossible to know
exact access with only type-id.
Source§fn visit_archetype(&self, archetype: &Archetype) -> bool
fn visit_archetype(&self, archetype: &Archetype) -> bool
Checks if archetype must be visited or skipped.
If returns
false
, access_archetype
and fetch
must not be called,
meaning that complex query should either skip archetype entirely or
for this query specifically. Read moreSource§unsafe fn access_archetype(
&self,
archetype: &Archetype,
f: impl FnMut(TypeId, Access),
)
unsafe fn access_archetype( &self, archetype: &Archetype, f: impl FnMut(TypeId, Access), )
Asks query to provide types and access for the specific archetype.
Must call provided closure with type id and access pairs.
Only types from archetype must be used to call closure. Read more
Source§unsafe fn fetch<'a>(
&self,
_arch_idx: u32,
archetype: &'a Archetype,
_epoch: EpochId,
) -> FetchBorrowAnyRead<'a, T>
unsafe fn fetch<'a>( &self, _arch_idx: u32, archetype: &'a Archetype, _epoch: EpochId, ) -> FetchBorrowAnyRead<'a, T>
Fetches data from one archetype. Read more
Source§const FILTERS_ENTITIES: bool = false
const FILTERS_ENTITIES: bool = false
Set to
true
if query filters individual entities.Source§impl<T> Query for QueryBorrowAny<Write<T>>where
T: ?Sized + 'static,
impl<T> Query for QueryBorrowAny<Write<T>>where
T: ?Sized + 'static,
Source§type Fetch<'a> = FetchBorrowAnyWrite<'a, T>
type Fetch<'a> = FetchBorrowAnyWrite<'a, T>
Fetch value type for this query type.
Contains data from one archetype.
Source§fn component_access(
&self,
comp: &ComponentInfo,
) -> Result<Option<Access>, WriteAlias>
fn component_access( &self, comp: &ComponentInfo, ) -> Result<Option<Access>, WriteAlias>
Returns what kind of access the query performs on the component type.
This method may return stronger access type if it is impossible to know
exact access with only type-id.
Source§fn visit_archetype(&self, archetype: &Archetype) -> bool
fn visit_archetype(&self, archetype: &Archetype) -> bool
Checks if archetype must be visited or skipped.
If returns
false
, access_archetype
and fetch
must not be called,
meaning that complex query should either skip archetype entirely or
for this query specifically. Read moreSource§unsafe fn access_archetype(
&self,
archetype: &Archetype,
f: impl FnMut(TypeId, Access),
)
unsafe fn access_archetype( &self, archetype: &Archetype, f: impl FnMut(TypeId, Access), )
Asks query to provide types and access for the specific archetype.
Must call provided closure with type id and access pairs.
Only types from archetype must be used to call closure. Read more
Source§unsafe fn fetch<'a>(
&self,
_arch_idx: u32,
archetype: &'a Archetype,
epoch: EpochId,
) -> FetchBorrowAnyWrite<'a, T>
unsafe fn fetch<'a>( &self, _arch_idx: u32, archetype: &'a Archetype, epoch: EpochId, ) -> FetchBorrowAnyWrite<'a, T>
Fetches data from one archetype. Read more
Source§const FILTERS_ENTITIES: bool = false
const FILTERS_ENTITIES: bool = false
Set to
true
if query filters individual entities.Source§impl<T> QueryArg for QueryBorrowAny<Read<T>>
impl<T> QueryArg for QueryBorrowAny<Read<T>>
Source§impl<T> QueryArg for QueryBorrowAny<Write<T>>
impl<T> QueryArg for QueryBorrowAny<Write<T>>
impl<T: Copy> Copy for QueryBorrowAny<T>
impl<T> SendQuery for QueryBorrowAny<Read<T>>
impl<T> SendQuery for QueryBorrowAny<Write<T>>
Auto Trait Implementations§
impl<T> Freeze for QueryBorrowAny<T>where
T: Freeze,
impl<T> RefUnwindSafe for QueryBorrowAny<T>where
T: RefUnwindSafe,
impl<T> Send for QueryBorrowAny<T>where
T: Send,
impl<T> Sync for QueryBorrowAny<T>where
T: Sync,
impl<T> Unpin for QueryBorrowAny<T>where
T: Unpin,
impl<T> UnwindSafe for QueryBorrowAny<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,
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_: &World) -> T
fn from_world(_: &World) -> T
Returns new value created from
World
reference.