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§

source

fn process_load_requests( &mut self, asset_manager: &mut AssetManager ) -> Result<(), RafxError>

Called every frame to process load queues

source

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

source

fn asset_type_id(&self) -> TypeId

Returns the TypeId of the asset

Provided Methods§

Implementors§

source§

impl<AssetDataT, AssetT, LoadHandlerT> AssetTypeHandler for DefaultAssetTypeHandler<AssetDataT, AssetT, LoadHandlerT>
where AssetDataT: TypeUuid + for<'a> Deserialize<'a> + 'static + Send + Clone, AssetT: TypeUuid + 'static + Send + Clone + Sync, LoadHandlerT: DefaultAssetTypeLoadHandler<AssetDataT, AssetT> + 'static + Sync + Send,