pub struct ReAll<'a> { /* private fields */ }Implementations§
Methods from Deref<Target = ResourceStorage>§
Sourcepub fn insert<R>(&mut self, resource: R)where
R: Resource,
pub fn insert<R>(&mut self, resource: R)where
R: Resource,
Inserts a new resource into the storage.
If a resource of the same type already exists, it will be replaced.
Sourcepub fn fetch_mut<R>(&mut self) -> &mut Rwhere
R: Resource,
pub fn fetch_mut<R>(&mut self) -> &mut Rwhere
R: Resource,
Retrieves a mutable reference to a resource of type R.
§Panics
Panics if the resource does not exist.
Sourcepub fn get<R>(&self) -> Option<&R>where
R: Resource + 'static,
pub fn get<R>(&self) -> Option<&R>where
R: Resource + 'static,
Retrieves an immutable reference to a resource of type R.
Returns Some(&R) if the resource exists, otherwise returns None.
Sourcepub fn get_mut<R>(&mut self) -> Option<&mut R>where
R: Resource + 'static,
pub fn get_mut<R>(&mut self) -> Option<&mut R>where
R: Resource + 'static,
Retrieves a mutable reference to a resource of type R.
Returns Some(&mut R) if the resource exists, otherwise returns None.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ReAll<'a>
impl<'a> !RefUnwindSafe for ReAll<'a>
impl<'a> !Send for ReAll<'a>
impl<'a> !Sync for ReAll<'a>
impl<'a> Unpin for ReAll<'a>
impl<'a> !UnwindSafe for ReAll<'a>
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