pub trait AssetTree: Component {
// Required method
fn asset_dependencies(&self) -> impl IntoIterator<Item = AssetPathStatic>;
}Expand description
Defines a trait for components that can have asset dependencies.
This trait is useful for AssetTreeProcessor protocol to gather asset
dependencies to load.
Required Methods§
Sourcefn asset_dependencies(&self) -> impl IntoIterator<Item = AssetPathStatic>
fn asset_dependencies(&self) -> impl IntoIterator<Item = AssetPathStatic>
Returns an iterator over the asset dependencies of this component.
The dependencies are represented as AssetPathStatic, which
are static paths to the assets that this component depends on.
§Returns
An iterator over AssetPathStatic representing the asset dependencies.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.