Trait asset_resolver::AssetResolver[][src]

pub trait AssetResolver {
    fn resolve(&self, path: &str) -> Option<PathBuf>;
}
Expand description

The asset resolver trait. This should be implemented by any custom resolvers

Required methods

Resolve a path to an asset.

The incoming path could be in any format. If it can be resolved by the implementer, it should return Some(PathBuf). Otherwise, it should return None.

Additional mechanisms may handle chaining resolvers to handle multiple path formats, so don’t worry about catching every case in one resolver.

Implementors