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
type DecodeError: Error + Send + Sync + 'static
type DecodeError: Error + Send + Sync + 'static
Decoding error.
type BuildError: Error + Send + Sync + 'static
type BuildError: Error + Send + Sync + 'static
Building error.