pub struct RefFetch<'a, F>(/* private fields */);
Expand description
Allows a fetch to be used by reference.
Trait Implementations§
Source§impl<'a, 'w, F> Fetch<'w> for RefFetch<'a, F>where
F: Fetch<'w>,
impl<'a, 'w, F> Fetch<'w> for RefFetch<'a, F>where
F: Fetch<'w>,
Source§const MUTABLE: bool = F::MUTABLE
const MUTABLE: bool = F::MUTABLE
true if the fetch mutates any component and thus needs a change event
Source§fn prepare(&'w self, data: FetchPrepareData<'w>) -> Option<Self::Prepared>
fn prepare(&'w self, data: FetchPrepareData<'w>) -> Option<Self::Prepared>
Prepares the fetch for an archetype by acquiring borrows. Read more
Source§fn filter_arch(&self, data: FetchAccessData<'_>) -> bool
fn filter_arch(&self, data: FetchAccessData<'_>) -> bool
Returns true if the archetype matches the fetch
Source§fn access(&self, data: FetchAccessData<'_>, dst: &mut Vec<Access>)
fn access(&self, data: FetchAccessData<'_>, dst: &mut Vec<Access>)
Returns which components and how will be accessed for an archetype.
Source§fn describe(&self, f: &mut Formatter<'_>) -> Result
fn describe(&self, f: &mut Formatter<'_>) -> Result
Describes the fetch in a human-readable fashion
Source§fn searcher(&self, searcher: &mut ArchetypeSearcher)
fn searcher(&self, searcher: &mut ArchetypeSearcher)
Returns the required component for the fetch. Read more
impl<'a, F> Copy for RefFetch<'a, F>
Auto Trait Implementations§
impl<'a, F> Freeze for RefFetch<'a, F>
impl<'a, F> RefUnwindSafe for RefFetch<'a, F>where
F: RefUnwindSafe,
impl<'a, F> Send for RefFetch<'a, F>where
F: Sync,
impl<'a, F> Sync for RefFetch<'a, F>where
F: Sync,
impl<'a, F> Unpin for RefFetch<'a, F>
impl<'a, F> UnwindSafe for RefFetch<'a, F>where
F: RefUnwindSafe,
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<F> FetchExt for Fwhere
F: for<'x> Fetch<'x>,
impl<F> FetchExt for Fwhere
F: for<'x> Fetch<'x>,
Source§fn opt_or<V>(self, default: V) -> OptOr<Self, V>
fn opt_or<V>(self, default: V) -> OptOr<Self, V>
Transform the fetch into a fetch with a provided default.
This is useful for default values such as scale or velocity which may
not exist for every entity.
Source§fn satisfied(self) -> Satisfied<Self>
fn satisfied(self) -> Satisfied<Self>
Returns true if the query is satisfied, without borrowing
Source§fn opt_or_default<V>(self) -> OptOr<Self, V>
fn opt_or_default<V>(self) -> OptOr<Self, V>
Transform the fetch into a fetch which yields the default impl if the
fetch is not matched.
Source§fn copied(self) -> Copied<Self>where
Copied<Self>: for<'x> Fetch<'x>,
fn copied(self) -> Copied<Self>where
Copied<Self>: for<'x> Fetch<'x>,
Transform this into a copied fetch
Source§fn ge<T>(self, other: T) -> Cmp<Self, GreaterEq<T>>
fn ge<T>(self, other: T) -> Cmp<Self, GreaterEq<T>>
Filter any component greater than or equal to
other
.Source§fn le<T>(self, other: T) -> Cmp<Self, LessEq<T>>
fn le<T>(self, other: T) -> Cmp<Self, LessEq<T>>
Filter any component less than or equal to
other
.Source§fn source<S>(self, source: S) -> Source<Self, S>where
S: FetchSource,
fn source<S>(self, source: S) -> Source<Self, S>where
S: FetchSource,
Set the source entity for the fetch. Read more
Source§fn relation<T, R>(self, relation: R) -> Source<Self, FromRelation>where
R: RelationExt<T>,
T: ComponentValue,
fn relation<T, R>(self, relation: R) -> Source<Self, FromRelation>where
R: RelationExt<T>,
T: ComponentValue,
Follows a relation to resolve the fetch. Read more
Source§fn traverse<T, R>(self, relation: R) -> Source<Self, Traverse>where
R: RelationExt<T>,
T: ComponentValue,
fn traverse<T, R>(self, relation: R) -> Source<Self, Traverse>where
R: RelationExt<T>,
T: ComponentValue,
Traverse the edges of a relation recursively to find the first entity which matches the fetch Read more
Source§fn modified(self) -> <Self as TransformFetch<Modified>>::Outputwhere
Self: TransformFetch<Modified>,
fn modified(self) -> <Self as TransformFetch<Modified>>::Outputwhere
Self: TransformFetch<Modified>,
Transform the fetch into a fetch where each constituent part tracks and yields for
modification events. Read more
Source§fn added(self) -> <Self as TransformFetch<Added>>::Outputwhere
Self: TransformFetch<Added>,
fn added(self) -> <Self as TransformFetch<Added>>::Outputwhere
Self: TransformFetch<Added>,
Transform the fetch into a fetch where each constituent part tracks and yields for
component addition events. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more