Trait distill_loader::handle::TypedAssetStorage[][src]

pub trait TypedAssetStorage<A> {
    fn get<T: AssetHandle>(&self, handle: &T) -> Option<&A>;
fn get_version<T: AssetHandle>(&self, handle: &T) -> Option<u32>;
fn get_asset_with_version<T: AssetHandle>(
        &self,
        handle: &T
    ) -> Option<(&A, u32)>; }

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]

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.
Loading content...

Implementors

Loading content...