pub struct OptionFetch<T>(/* private fields */);
Trait Implementations§
Source§impl<T: Default> Default for OptionFetch<T>
impl<T: Default> Default for OptionFetch<T>
Source§fn default() -> OptionFetch<T>
fn default() -> OptionFetch<T>
Returns the “default value” for a type. Read more
Source§impl<'a, F: Fetch<'a>> Fetch<'a> for OptionFetch<F>
impl<'a, F: Fetch<'a>> Fetch<'a> for OptionFetch<F>
type Output = Option<<F as Fetch<'a>>::Output>
type WorldBorrows = Option<<F as Fetch<'a>>::WorldBorrows>
type DirectBorrows = Option<<F as Fetch<'a>>::DirectBorrows>
unsafe fn borrow_world(&self, world: &'a World) -> Option<Self::WorldBorrows>
unsafe fn get_world( &self, borrows: &Self::WorldBorrows, id: Id, ) -> Option<Self::Output>
unsafe fn borrow_direct( &self, entity: &'a Entity, ) -> Option<Self::DirectBorrows>
unsafe fn get(&self, borrows: &Self::DirectBorrows) -> Self::Output
Auto Trait Implementations§
impl<T> Freeze for OptionFetch<T>where
T: Freeze,
impl<T> RefUnwindSafe for OptionFetch<T>where
T: RefUnwindSafe,
impl<T> Send for OptionFetch<T>where
T: Send,
impl<T> Sync for OptionFetch<T>where
T: Sync,
impl<T> Unpin for OptionFetch<T>where
T: Unpin,
impl<T> UnwindSafe for OptionFetch<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