logo
pub struct BasicAssetPack {
    pub loader: Rc<BasicAssetPackLoader>,
    pub textures: HashMap<String, Rc<dyn Texture + 'static>, RandomState>,
    pub sounds: HashMap<String, Rc<dyn Sound + 'static>, RandomState>,
    pub files: HashMap<String, Rc<dyn File + 'static>, RandomState>,
    pub disposed: bool,
    /* private fields */
}

Fields

loader: Rc<BasicAssetPackLoader>textures: HashMap<String, Rc<dyn Texture + 'static>, RandomState>sounds: HashMap<String, Rc<dyn Sound + 'static>, RandomState>files: HashMap<String, Rc<dyn File + 'static>, RandomState>disposed: bool

Implementations

Trait Implementations

The manifest that was used to load this asset pack. Gets a texture by name from the asset pack. The name must NOT contain a filename extension. Textures are cached, so it’s safe to get the same texture multiple times. @param required If true and the asset was not found, an error is thrown. Read more

Gets a sound by name from the asset pack. The name must NOT contain a filename extension. Sounds are cached, so it’s safe to get the same sound multiple times. @param required If true and the asset was not found, an error is thrown. Read more

Gets a file by name from the asset pack, returning its raw content. Files are cached, so it’s safe to get the same file multiple times. @param required If true and the asset was not found, an error is thrown. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Typed getter

Inspect the context.

Inspect the context.

Inspect the context.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert into color

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Sets value as a parameter of self.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.