pub trait Asset: Clone + Sized + Send + Sync + 'static {
    type Decoded: Send + Sync;
    type DecodeError: Error + Send + Sync + 'static;
    type BuildError: Error + Send + Sync + 'static;
    type Fut: Future<Output = Result<Self::Decoded, Self::DecodeError>> + Send;
    fn name() -> &'static str;
fn decode(bytes: Box<[u8]>, loader: &Loader) -> Self::Fut; }
Expand description

An asset type that can be built from decoded representation.

Associated Types

Decoded representation of this asset.

Decoding error.

Building error.

Future that will resolve into decoded asset when ready.

Required methods

Asset name.

Decode asset from bytes loaded from asset source.

Implementors