pub trait ResourceDefaultLoader:
Send
+ Sync
+ 'static {
type Loader: ResourceLoader<Output = Self>;
// Required method
fn default_loader() -> Self::Loader;
}Expand description
Trait used to define a “default” ResourceLoader for a resource type.
Any resource type that implements ResourceDefaultLoader can be loaded via
ResourceManager::get(), where the used ResourceLoader is
automatically determined and created.
Note that ResourceLoaders created by this trait must be able to do so without any extra arguments.
Required Associated Types§
Sourcetype Loader: ResourceLoader<Output = Self>
type Loader: ResourceLoader<Output = Self>
The concrete default ResourceLoader type.
Required Methods§
Sourcefn default_loader() -> Self::Loader
fn default_loader() -> Self::Loader
Create a default ResourceLoader for this resource type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".