[−][src]Trait goods::Asset
Loaded, processed and prepared asset.
This trait specifies how asset instances can be built from intermediate values
that are produced by Format
implemetations.
Associated Types
type Error: Error + Send + Sync + 'static
Error that may occur during asset building.
type Repr: Send
Intermediate representation type for the asset.
This representation is constructed by Format::decode
.
type Context
Asset processing context.
Instance of context is required to convert asset intermediate representation into asset instance.
Special context type PhantomContext
can be specified if no context is required,
reducing overhead and making asset building occur faster.
type BuildFuture: Future<Output = Result<Self, Self::Error>> + Send + 'static
Asynchronous result produced by asset building.
Required methods
fn build(repr: Self::Repr, ctx: &mut Self::Context) -> Self::BuildFuture
Build asset instance from intermediate representation using provided context.