pub struct Assets<T: 'static + Send + Sync> { /* private fields */ }Implementations§
Source§impl<T: 'static + Send + Sync> Assets<T>
impl<T: 'static + Send + Sync> Assets<T>
pub fn new() -> Self
pub fn insert(&mut self, name: &str, asset: T) -> RawAssetHandle
pub fn get(&self, handle: RawAssetHandle) -> Option<&T>
pub fn get_mut(&mut self, handle: RawAssetHandle) -> Option<&mut T>
pub fn get_by_name(&self, name: &str) -> Option<&T>
pub fn get_mut_by_name(&mut self, name: &str) -> Option<&mut T>
pub fn take_dirty(&mut self) -> Vec<RawAssetHandle>
pub fn remove(&mut self, handle: RawAssetHandle) -> Option<T>
pub fn remove_by_name(&mut self, name: &str) -> Option<T>
Auto Trait Implementations§
impl<T> Freeze for Assets<T>
impl<T> RefUnwindSafe for Assets<T>where
T: RefUnwindSafe,
impl<T> Send for Assets<T>
impl<T> Sync for Assets<T>
impl<T> Unpin for Assets<T>where
T: Unpin,
impl<T> UnsafeUnpin for Assets<T>
impl<T> UnwindSafe for Assets<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