LoaderInfoProvider

Trait LoaderInfoProvider 

Source
pub trait LoaderInfoProvider: Send + Sync {
    // Required methods
    fn get_load_handle(&self, asset_ref: &AssetRef) -> Option<LoadHandle>;
    fn get_asset_id(&self, load: LoadHandle) -> Option<AssetUuid>;
}
Expand description

Provides information about mappings between AssetUuid and LoadHandle. Intended to be used for Handle serde.

Required Methods§

Source

fn get_load_handle(&self, asset_ref: &AssetRef) -> Option<LoadHandle>

Returns the load handle for the asset with the given UUID, if present.

This will only return Some(..) if there has been a previous call to crate::loader::Loader::add_ref.

§Parameters
  • id: UUID of the asset.
Source

fn get_asset_id(&self, load: LoadHandle) -> Option<AssetUuid>

Returns the AssetUUID for the given LoadHandle, if present.

§Parameters
  • load_handle: ID allocated by Loader to track loading of the asset.

Implementors§