pub struct FilterRelatesTo<R> { /* private fields */ }
Expand description
Filters origins of relation with specified target.
Implementations§
Trait Implementations§
Source§impl<R> AsQuery for FilterRelatesTo<R>where
R: Relation,
impl<R> AsQuery for FilterRelatesTo<R>where
R: Relation,
Source§type Query = FilterRelatesTo<R>
type Query = FilterRelatesTo<R>
Associated query type.
Source§impl<R> Clone for FilterRelatesTo<R>
impl<R> Clone for FilterRelatesTo<R>
Source§impl<R> Debug for FilterRelatesTo<R>
impl<R> Debug for FilterRelatesTo<R>
Source§impl<R> ImmutableQuery for FilterRelatesTo<R>where
R: Relation,
impl<R> ImmutableQuery for FilterRelatesTo<R>where
R: Relation,
Source§const CHECK_VALID: () = _
const CHECK_VALID: () = _
Checks that query is valid in compile time.
Source§impl<R> IntoQuery for FilterRelatesTo<R>where
R: Relation,
impl<R> IntoQuery for FilterRelatesTo<R>where
R: Relation,
Source§fn into_query(self) -> Self::Query
fn into_query(self) -> Self::Query
Converts into query.
Source§impl<R> Query for FilterRelatesTo<R>where
R: Relation,
impl<R> Query for FilterRelatesTo<R>where
R: Relation,
Source§const FILTERS_ENTITIES: bool = true
const FILTERS_ENTITIES: bool = true
Set to
true
if query filters individual entities.Source§type Fetch<'a> = FilterFetchRelatesTo<'a, R>
type Fetch<'a> = FilterFetchRelatesTo<'a, R>
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,
) -> FilterFetchRelatesTo<'a, R>
unsafe fn fetch<'a>( &self, _arch_idx: u32, archetype: &'a Archetype, _epoch: EpochId, ) -> FilterFetchRelatesTo<'a, R>
Fetches data from one archetype. Read more
impl<R> Copy for FilterRelatesTo<R>
impl<R> SendQuery for FilterRelatesTo<R>where
R: Relation,
Auto Trait Implementations§
impl<R> Freeze for FilterRelatesTo<R>
impl<R> RefUnwindSafe for FilterRelatesTo<R>
impl<R> Send for FilterRelatesTo<R>
impl<R> Sync for FilterRelatesTo<R>
impl<R> Unpin for FilterRelatesTo<R>
impl<R> UnwindSafe for FilterRelatesTo<R>
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