Trait distill_loader::handle::AssetHandle [−][src]
The contract of an asset handle.
There are two types of asset handles:
- Typed –
Handle<T>
: When the asset’s type is known when loading. - Generic –
GenericHandle
: When only the asset’s UUID is known when loading.
Required methods
fn load_handle(&self) -> LoadHandle
[src]
Returns the LoadHandle
of this asset handle.
Provided methods
fn load_status(&self, loader: &Loader) -> LoadStatus
[src]
Returns the load status of the asset.
Parameters
loader
: Loader that is loading the asset.
Type Parameters
L
: Asset loader type.
fn asset<'a, T, S: TypedAssetStorage<T>>(&self, storage: &'a S) -> Option<&'a T> where
Self: Sized,
[src]
Self: Sized,
fn asset_version<T, S: TypedAssetStorage<T>>(&self, storage: &S) -> Option<u32> where
Self: Sized,
[src]
Self: Sized,
fn asset_with_version<'a, T, S: TypedAssetStorage<T>>(
&self,
storage: &'a S
) -> Option<(&'a T, u32)> where
Self: Sized,
[src]
&self,
storage: &'a S
) -> Option<(&'a T, u32)> where
Self: Sized,
fn downgrade(&self) -> WeakHandle
[src]
Downgrades this handle into a WeakHandle
.
Be aware that if there are no longer any strong handles to the asset, then the underlying asset may be freed at any time.