Struct amethyst_assets::SimpleContext [] [src]

pub struct SimpleContext<A, D, T> { /* fields omitted */ }

A simple implementation of the Context trait.

Methods

impl<A, D, T> SimpleContext<A, D, T>
[src]

Creates a new SimpleContext from a category string and a closure which transforms data to assets.

Trait Implementations

impl<A, D, T> Send for SimpleContext<A, D, T> where
    T: Send
[src]

impl<A, D, T> Sync for SimpleContext<A, D, T> where
    T: Sync
[src]

impl<A, D, E, R, T> Context for SimpleContext<A, D, T> where
    A: Clone,
    R: Send + 'static,
    D: Send + 'static,
    T: Fn(D) -> R + Send + Sync + 'static,
    SimpleAsset<A>: Asset + Clone + Send + 'static,
    E: Error + Send + Sync,
    R: IntoFuture<Item = SimpleAsset<A>, Error = E>, 
[src]

The asset type this context can produce.

The Data type the asset can be created from.

The error that may be returned from create_asset.

The result type for loading an asset. This can also be a future (or anything that implements IntoFuture). Read more

A small keyword for which category these assets belongs to. Read more

Provides the conversion from the data format to the actual asset.

Notifies about an asset load. This is can be used to cache the asset. To return a cached asset, see the retrieve function. Read more

Returns Some cached value if possible, otherwise None. Read more

Updates an asset after it's been reloaded. Read more

Gives a hint that several assets may have been released recently. Read more

Request for clearing the whole cache.