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]

[src]

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

[src]

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

[src]

Retrieves an asset handle using a given key.

[src]

Deletes all cached handles which are invalid.

[src]

Clears all values.

Trait Implementations

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

[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