Skip to main content

AssetTree

Trait AssetTree 

Source
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§

Source

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.

Implementations on Foreign Types§

Source§

impl AssetTree for AssetRef

Source§

impl AssetTree for SmartAssetRef

Source§

impl AssetTree for AssetPathStatic

Source§

impl<T: AssetTree> AssetTree for Option<T>

Implementors§