[][src]Struct amethyst_assets::AssetStorage

pub struct AssetStorage<A: Asset> { /* fields omitted */ }

An asset storage, storing the actual assets and allocating handles to them.

Methods

impl<A: Asset> AssetStorage<A>
[src]

Creates a new asset storage.

When cloning an asset handle, you'll get another handle, but pointing to the same asset. If you instead want to indeed create a new asset, you can use this method. Note however, that it needs a mutable borrow of self, so it can't be used in parallel.

Get an asset from a given asset handle.

Get an asset mutably from a given asset handle.

Process finished asset data and maintain the storage.

Process finished asset data and maintain the storage. This calls the drop_fn closure for assets that were removed from the storage.

Trait Implementations

impl<A: Asset> Drop for AssetStorage<A>
[src]

impl<A: Asset> Default for AssetStorage<A>
[src]

Auto Trait Implementations

impl<A> Send for AssetStorage<A> where
    <A as Asset>::Data: Send

impl<A> Sync for AssetStorage<A> where
    <A as Asset>::Data: Send

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

impl<T> Event for T where
    T: Send + Sync + 'static, 

impl<T> Erased for T

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

impl<T> Any for T where
    T: Any

impl<T> TryDefault for T where
    T: Default

Calls try_default and panics on an error case.

impl<T> Erased for T