pub struct Modified<T> { /* private fields */ }
Expand description
Query over modified component.
Should be used as either Modified<&T>
, Modified<&mut T>
or Modified<Alt<T>>
.
This is tracking query that uses epoch lower bound to filter out entities with unmodified components.
Implementations§
Trait Implementations§
Source§impl<T> ImmutableQuery for Modified<Cpy<T>>where
T: Copy + 'static,
impl<T> ImmutableQuery for Modified<Cpy<T>>where
T: Copy + 'static,
Source§const CHECK_VALID: () = _
const CHECK_VALID: () = _
Checks that query is valid in compile time.
Source§impl<T> ImmutableQuery for Modified<OptionQuery<Cpy<T>>>where
T: Copy + 'static,
impl<T> ImmutableQuery for Modified<OptionQuery<Cpy<T>>>where
T: Copy + 'static,
Source§const CHECK_VALID: () = _
const CHECK_VALID: () = _
Checks that query is valid in compile time.
Source§impl<T> ImmutableQuery for Modified<OptionQuery<Read<T>>>where
T: 'static,
impl<T> ImmutableQuery for Modified<OptionQuery<Read<T>>>where
T: 'static,
Source§const CHECK_VALID: () = _
const CHECK_VALID: () = _
Checks that query is valid in compile time.
Source§impl<T> ImmutableQuery for Modified<Read<T>>where
T: 'static,
impl<T> ImmutableQuery for Modified<Read<T>>where
T: 'static,
Source§const CHECK_VALID: () = _
const CHECK_VALID: () = _
Checks that query is valid in compile time.
Source§impl<T> ImmutableQuery for Modified<With<T>>where
T: 'static,
impl<T> ImmutableQuery for Modified<With<T>>where
T: 'static,
Source§const CHECK_VALID: () = _
const CHECK_VALID: () = _
Checks that query is valid in compile time.
Source§impl<T> IntoQuery for Modified<Alt<T>>where
T: 'static,
impl<T> IntoQuery for Modified<Alt<T>>where
T: 'static,
Source§fn into_query(self) -> Self::Query
fn into_query(self) -> Self::Query
Converts into query.
Source§impl<T> IntoQuery for Modified<Cpy<T>>where
T: Copy + 'static,
impl<T> IntoQuery for Modified<Cpy<T>>where
T: Copy + 'static,
Source§fn into_query(self) -> Self
fn into_query(self) -> Self
Converts into query.
Source§impl<T> IntoQuery for Modified<OptionQuery<Alt<T>>>where
T: 'static,
impl<T> IntoQuery for Modified<OptionQuery<Alt<T>>>where
T: 'static,
Source§fn into_query(self) -> Self
fn into_query(self) -> Self
Converts into query.
Source§impl<T> IntoQuery for Modified<OptionQuery<Cpy<T>>>where
T: Copy + 'static,
impl<T> IntoQuery for Modified<OptionQuery<Cpy<T>>>where
T: Copy + 'static,
Source§fn into_query(self) -> Self
fn into_query(self) -> Self
Converts into query.
Source§impl<T> IntoQuery for Modified<OptionQuery<Read<T>>>where
T: 'static,
impl<T> IntoQuery for Modified<OptionQuery<Read<T>>>where
T: 'static,
Source§fn into_query(self) -> Self
fn into_query(self) -> Self
Converts into query.
Source§impl<T> IntoQuery for Modified<OptionQuery<Write<T>>>where
T: 'static,
impl<T> IntoQuery for Modified<OptionQuery<Write<T>>>where
T: 'static,
Source§fn into_query(self) -> Self
fn into_query(self) -> Self
Converts into query.
Source§impl<T> IntoQuery for Modified<Read<T>>where
T: 'static,
impl<T> IntoQuery for Modified<Read<T>>where
T: 'static,
Source§fn into_query(self) -> Self
fn into_query(self) -> Self
Converts into query.
Source§impl<T> IntoQuery for Modified<With<T>>where
T: 'static,
impl<T> IntoQuery for Modified<With<T>>where
T: 'static,
Source§fn into_query(self) -> Self
fn into_query(self) -> Self
Converts into query.
Source§impl<T> IntoQuery for Modified<Write<T>>where
T: 'static,
impl<T> IntoQuery for Modified<Write<T>>where
T: 'static,
Source§fn into_query(self) -> Self
fn into_query(self) -> Self
Converts into query.
Source§impl<T> Query for Modified<Alt<T>>where
T: 'static,
impl<T> Query for Modified<Alt<T>>where
T: 'static,
Source§type Fetch<'a> = ModifiedFetchAlt<'a, T>
type Fetch<'a> = ModifiedFetchAlt<'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,
) -> ModifiedFetchAlt<'a, T>
unsafe fn fetch<'a>( &self, _arch_idx: u32, archetype: &'a Archetype, epoch: EpochId, ) -> ModifiedFetchAlt<'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 Modified<Cpy<T>>where
T: Copy + 'static,
impl<T> Query for Modified<Cpy<T>>where
T: Copy + 'static,
Source§type Fetch<'a> = ModifiedFetchCopied<'a, T>
type Fetch<'a> = ModifiedFetchCopied<'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,
) -> ModifiedFetchCopied<'a, T>
unsafe fn fetch<'a>( &self, _arch_idx: u32, archetype: &'a Archetype, _epoch: EpochId, ) -> ModifiedFetchCopied<'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 Modified<OptionQuery<Alt<T>>>where
T: 'static,
impl<T> Query for Modified<OptionQuery<Alt<T>>>where
T: 'static,
Source§type Fetch<'a> = Option<ModifiedFetchAlt<'a, T>>
type Fetch<'a> = Option<ModifiedFetchAlt<'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,
) -> Option<ModifiedFetchAlt<'a, T>>
unsafe fn fetch<'a>( &self, _arch_idx: u32, archetype: &'a Archetype, epoch: EpochId, ) -> Option<ModifiedFetchAlt<'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 Modified<OptionQuery<Cpy<T>>>where
T: Copy + 'static,
impl<T> Query for Modified<OptionQuery<Cpy<T>>>where
T: Copy + 'static,
Source§type Fetch<'a> = Option<ModifiedFetchCopied<'a, T>>
type Fetch<'a> = Option<ModifiedFetchCopied<'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,
) -> Option<ModifiedFetchCopied<'a, T>>
unsafe fn fetch<'a>( &self, _arch_idx: u32, archetype: &'a Archetype, _epoch: EpochId, ) -> Option<ModifiedFetchCopied<'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 Modified<OptionQuery<Read<T>>>where
T: 'static,
impl<T> Query for Modified<OptionQuery<Read<T>>>where
T: 'static,
Source§type Fetch<'a> = Option<ModifiedFetchRead<'a, T>>
type Fetch<'a> = Option<ModifiedFetchRead<'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,
) -> Option<ModifiedFetchRead<'a, T>>
unsafe fn fetch<'a>( &self, _arch_idx: u32, archetype: &'a Archetype, _epoch: EpochId, ) -> Option<ModifiedFetchRead<'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 Modified<OptionQuery<Write<T>>>where
T: 'static,
impl<T> Query for Modified<OptionQuery<Write<T>>>where
T: 'static,
Source§type Fetch<'a> = Option<ModifiedFetchWrite<'a, T>>
type Fetch<'a> = Option<ModifiedFetchWrite<'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,
) -> Option<ModifiedFetchWrite<'a, T>>
unsafe fn fetch<'a>( &self, _arch_idx: u32, archetype: &'a Archetype, epoch: EpochId, ) -> Option<ModifiedFetchWrite<'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 Modified<Read<T>>where
T: 'static,
impl<T> Query for Modified<Read<T>>where
T: 'static,
Source§type Fetch<'a> = ModifiedFetchRead<'a, T>
type Fetch<'a> = ModifiedFetchRead<'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,
) -> ModifiedFetchRead<'a, T>
unsafe fn fetch<'a>( &self, _arch_idx: u32, archetype: &'a Archetype, _epoch: EpochId, ) -> ModifiedFetchRead<'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 Modified<With<T>>where
T: 'static,
impl<T> Query for Modified<With<T>>where
T: 'static,
Source§type Fetch<'a> = ModifiedFetchWith<'a, T>
type Fetch<'a> = ModifiedFetchWith<'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,
) -> ModifiedFetchWith<'a, T>
unsafe fn fetch<'a>( &self, _arch_idx: u32, archetype: &'a Archetype, _epoch: EpochId, ) -> ModifiedFetchWith<'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 Modified<Write<T>>where
T: 'static,
impl<T> Query for Modified<Write<T>>where
T: 'static,
Source§type Fetch<'a> = ModifiedFetchWrite<'a, T>
type Fetch<'a> = ModifiedFetchWrite<'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,
) -> ModifiedFetchWrite<'a, T>
unsafe fn fetch<'a>( &self, _arch_idx: u32, archetype: &'a Archetype, epoch: EpochId, ) -> ModifiedFetchWrite<'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.impl<T: Copy> Copy for Modified<T>
impl<T> SendQuery for Modified<Alt<T>>where
T: Send + 'static,
impl<T> SendQuery for Modified<Cpy<T>>
impl<T> SendQuery for Modified<OptionQuery<Alt<T>>>where
T: Send + 'static,
impl<T> SendQuery for Modified<OptionQuery<Cpy<T>>>
impl<T> SendQuery for Modified<OptionQuery<Read<T>>>where
T: Sync + 'static,
impl<T> SendQuery for Modified<OptionQuery<Write<T>>>where
T: Send + 'static,
impl<T> SendQuery for Modified<Read<T>>where
T: Sync + 'static,
impl<T> SendQuery for Modified<With<T>>where
T: 'static,
impl<T> SendQuery for Modified<Write<T>>where
T: Send + 'static,
Auto Trait Implementations§
impl<T> Freeze for Modified<T>where
T: Freeze,
impl<T> RefUnwindSafe for Modified<T>where
T: RefUnwindSafe,
impl<T> Send for Modified<T>where
T: Send,
impl<T> Sync for Modified<T>where
T: Sync,
impl<T> Unpin for Modified<T>where
T: Unpin,
impl<T> UnwindSafe for Modified<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