Trait rafx::assets::AssetTypeHandler
source · pub trait AssetTypeHandler: Sync + Send {
// Required methods
fn process_load_requests(
&mut self,
asset_manager: &mut AssetManager
) -> Result<(), RafxError>;
fn asset_lookup(&self) -> &(dyn DynAssetLookup + 'static);
fn asset_type_id(&self) -> TypeId;
// Provided method
fn on_frame_complete(&mut self) -> Result<(), RafxError> { ... }
}
Required Methods§
sourcefn process_load_requests(
&mut self,
asset_manager: &mut AssetManager
) -> Result<(), RafxError>
fn process_load_requests( &mut self, asset_manager: &mut AssetManager ) -> Result<(), RafxError>
Called every frame to process load queues
sourcefn asset_lookup(&self) -> &(dyn DynAssetLookup + 'static)
fn asset_lookup(&self) -> &(dyn DynAssetLookup + 'static)
Return the asset lookup which can be used to obtain the committed and the latest (but possibly not committed) version of the asset
sourcefn asset_type_id(&self) -> TypeId
fn asset_type_id(&self) -> TypeId
Returns the TypeId of the asset