pub struct Opt<F>(_);Expand description
Transform a fetch into a optional fetch
Trait Implementations
sourceimpl<'w, F> Fetch<'w> for Opt<F>where
F: Fetch<'w>,
impl<'w, F> Fetch<'w> for Opt<F>where
F: Fetch<'w>,
sourceconst MUTABLE: bool = F::MUTABLE
const MUTABLE: bool = F::MUTABLE
true if the fetch mutates any component and thus needs a change event
sourceconst HAS_FILTER: bool = F::HAS_FILTER
const HAS_FILTER: bool = F::HAS_FILTER
true if the fetch has a filter
type Filter = <F as Fetch<'w>>::Filter
type Filter = <F as Fetch<'w>>::Filter
The filter associated to the fetch, if applicable. If the fetch does not
use a filter, use the crate::All filter Read more
sourcefn prepare(&'w self, data: FetchPrepareData<'w>) -> Option<Self::Prepared>
fn prepare(&'w self, data: FetchPrepareData<'w>) -> Option<Self::Prepared>
Prepare the query against an archetype. Returns None if doesn’t match. If Self::matches true, this needs to return Some Read more
sourcefn matches(&self, _: FetchPrepareData<'_>) -> bool
fn matches(&self, _: FetchPrepareData<'_>) -> bool
Returns true if the fetch matches the archetype
sourcefn describe(&self, f: &mut dyn Write) -> Result
fn describe(&self, f: &mut dyn Write) -> Result
Describes the fetch in a human-readable fashion
sourcefn access(&self, data: FetchPrepareData<'_>) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn access(&self, data: FetchPrepareData<'_>) -> Vec<Access>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Returns which components and how will be accessed for an archetype.
Auto Trait Implementations
impl<F> RefUnwindSafe for Opt<F>where
F: RefUnwindSafe,
impl<F> Send for Opt<F>where
F: Send,
impl<F> Sync for Opt<F>where
F: Sync,
impl<F> Unpin for Opt<F>where
F: Unpin,
impl<F> UnwindSafe for Opt<F>where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more