[][src]Trait amethyst_assets::Asset

pub trait Asset: Send + Sync + 'static {
    type Data: Send + Sync + 'static;
    type HandleStorage: UnprotectedStorage<Handle<Self>> + Send + Sync;

    const NAME: &'static str;
}

One of the three core traits of this crate.

You want to implement this for every type of asset like

and so on. Now, an asset may be available in different formats. That's why we have the Data associated type here. You can specify an intermediate format here, like the vertex data for a mesh or the samples for audio data.

This data is then generated by the Format trait.

Associated Types

The Data type the asset can be created from.

The ECS storage type to be used. You'll want to use VecStorage in most cases.

Associated Constants

An identifier for this asset used for debugging.

Implementors

impl<T> Asset for Prefab<T> where
    T: Send + Sync + 'static, 
[src]