pub trait AssetResolver {
// Required method
fn resolve(&self, path: &str) -> Option<PathBuf>;
}
Expand description
The asset resolver trait. This should be implemented by any custom resolvers
Required Methods§
Sourcefn resolve(&self, path: &str) -> Option<PathBuf>
fn resolve(&self, path: &str) -> Option<PathBuf>
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.