[][src]Trait goods::SyncAsset

pub trait SyncAsset: Send + Sync + Sized + 'static {
    type Error: Error + Send + Sync + 'static;
    type Context;
    type Repr: Send;
    fn build(
        repr: Self::Repr,
        ctx: &mut Self::Context
    ) -> Result<Self, Self::Error>; }

Shortcut for implementing Asset when asset building is synchronous.

Associated Types

type Error: Error + Send + Sync + 'static

Error that may occur during asset building.

type Context

Asset processing context. Instance of context is required to convert asset intermediate representation into asset instance.

type Repr: Send

Intermediate representation type for the asset. This representation is constructed by Format::decode.

Loading content...

Required methods

fn build(repr: Self::Repr, ctx: &mut Self::Context) -> Result<Self, Self::Error>

Build asset instance from intermediate representation using provided context.

Loading content...

Implementors

impl<S> SyncAsset for S where
    S: SimpleAsset
[src]

type Error = Infallible

type Repr = Self

type Context = PhantomContext

Loading content...