Skip to main content

AssetLoader

Trait AssetLoader 

Source
pub trait AssetLoader:
    Any
    + Send
    + Sync
    + 'static {
    type Asset: Asset<Loader = Self>;

    // Required method
    fn load(
        &self,
        path: &Path,
        library: &AssetLibrary,
    ) -> Result<Arc<Self::Asset>, LoadErr>;
}

Required Associated Types§

Source

type Asset: Asset<Loader = Self>

Required Methods§

Source

fn load( &self, path: &Path, library: &AssetLibrary, ) -> Result<Arc<Self::Asset>, LoadErr>

Implementors§