pub trait AssetCreationHandler {
// Required method
fn create_asset(
&mut self,
identifier: &str,
reader: &mut dyn Read,
) -> Option<Box<dyn Any>>;
}Expand description
An AssetCreationHandler is a delegate that handles the creation (usually deserialization) and allocation of assets from an input byte stream.
You could compose multiple AssetCreationHandlers by creating a handler that maps to other handlers based on the identifier’s file extension or magic numbers in the input stream. See ExtensionMappedAssetCreationHandler.