pub trait Asset<B>: AssetSource {
type Deps<'a>: Dependencies<'a>;
// Required method
fn upload<'a>(
&self,
backend: &B,
deps: &Self::Deps<'a>,
) -> Option<Self::Processed>;
}Expand description
Describes how to turn a CPU-side source into its GPU-side (or otherwise
processed) form using backend B. Deps<'a> names any other resources
the upload needs; if they, or B itself, aren’t available yet,
upload returning None just retries next tick — no manual ordering.
Required Associated Types§
type Deps<'a>: Dependencies<'a>
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".