Struct rafx::assets::AssetLookup
source · pub struct AssetLookup<AssetT> {
pub loaded_assets: HashMap<LoadHandle, LoadedAssetState<AssetT>, BuildHasherDefault<FnvHasher>>,
}
Fields§
§loaded_assets: HashMap<LoadHandle, LoadedAssetState<AssetT>, BuildHasherDefault<FnvHasher>>
Implementations§
source§impl<AssetT> AssetLookup<AssetT>
impl<AssetT> AssetLookup<AssetT>
pub fn set_uncommitted(&mut self, load_handle: LoadHandle, loaded_asset: AssetT)
pub fn commit(&mut self, load_handle: LoadHandle)
pub fn free(&mut self, load_handle: LoadHandle)
pub fn get_latest( &self, resolved_load_handle: &Arc<ResolvedLoadHandle> ) -> Option<&AssetT>
pub fn get_committed( &self, resolved_load_handle: &Arc<ResolvedLoadHandle> ) -> Option<&AssetT>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn destroy(&mut self)
Trait Implementations§
source§impl<AssetT> Default for AssetLookup<AssetT>
impl<AssetT> Default for AssetLookup<AssetT>
source§fn default() -> AssetLookup<AssetT>
fn default() -> AssetLookup<AssetT>
Returns the “default value” for a type. Read more
impl<AssetT> DynAssetLookup for AssetLookup<AssetT>where
AssetT: 'static,
Auto Trait Implementations§
impl<AssetT> RefUnwindSafe for AssetLookup<AssetT>where
AssetT: RefUnwindSafe,
impl<AssetT> Send for AssetLookup<AssetT>where
AssetT: Send,
impl<AssetT> Sync for AssetLookup<AssetT>where
AssetT: Sync,
impl<AssetT> Unpin for AssetLookup<AssetT>where
AssetT: Unpin,
impl<AssetT> UnwindSafe for AssetLookup<AssetT>where
AssetT: 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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.