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§
Required Methods§
Sourcefn as_asset_id(&self) -> AssetId<Self::Asset>
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.