Struct amethyst_assets::Cache[][src]

pub struct Cache<A> { /* fields omitted */ }

A simple cache for asset handles of type A. This stores WeakHandle, so it doesn't keep the assets alive.

Methods

impl<A> Cache<A> where
    A: Clone
[src]

Creates a new Cache and initializes it with the default values.

Inserts an asset with a given key and returns the old value (if any).

Retrieves an asset handle using a given key.

Deletes all cached handles which are invalid.

Clears all values.

Trait Implementations

impl<A> Default for Cache<A>
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl<A> Send for Cache<A> where
    A: Send

impl<A> Sync for Cache<A> where
    A: Sync