Trait distill_loader::handle::TypedAssetStorage [−][src]
Implementors of crate::storage::AssetStorage
can implement this trait to enable convenience
functions on the common AssetHandle
trait, which is implemented by all handle types.
Required methods
fn get<T: AssetHandle>(&self, handle: &T) -> Option<&A>
[src]
Returns the asset for the given handle, or None
if has not completed loading.
Parameters
handle
: Handle of the asset.
Type Parameters
T
: Asset handle type.
fn get_version<T: AssetHandle>(&self, handle: &T) -> Option<u32>
[src]
Returns the version of a loaded asset, or None
if has not completed loading.
Parameters
handle
: Handle of the asset.
Type Parameters
T
: Asset handle type.
fn get_asset_with_version<T: AssetHandle>(
&self,
handle: &T
) -> Option<(&A, u32)>
[src]
&self,
handle: &T
) -> Option<(&A, u32)>
Returns the loaded asset and its version, or None
if has not completed loading.
Parameters
handle
: Handle of the asset.
Type Parameters
T
: Asset handle type.