Trait AsAssetId

Source
pub trait AsAssetId: Component {
    type Asset: Asset;

    // Required method
    fn as_asset_id(&self) -> AssetId<Self::Asset>;
}
Expand description

A trait for components that can be used as asset identifiers, e.g. handle wrappers.

Required Associated Types§

Source

type Asset: Asset

The underlying asset type.

Required Methods§

Source

fn as_asset_id(&self) -> AssetId<Self::Asset>

Retrieves the asset id from this component.

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.

Implementors§