bevy_asset

Trait Asset

Source
pub trait Asset:
    VisitAssetDependencies
    + TypePath
    + Send
    + Sync
    + 'static { }
Expand description

Declares that this type is an asset, which can be loaded and managed by the AssetServer and stored in Assets collections.

Generally, assets are large, complex, and/or expensive to load from disk, and are often authored by artists or designers.

TypePath is largely used for diagnostic purposes, and should almost always be implemented by deriving Reflect on your type. VisitAssetDependencies is used to track asset dependencies, and an implementation is automatically generated when deriving Asset.

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 Asset for ()

Implementors§