pub struct Loaded(_);
👎 Deprecated:

use the three-d-asset crate instead

Implementations

👎 Deprecated:

use the three-d-asset crate instead

👎 Deprecated:

use the three-d-asset crate instead

👎 Deprecated:

use the three-d-asset crate instead

👎 Deprecated:

use the three-d-asset crate instead

Deserialize the image resource at the given path into a CpuTexture.

👎 Deprecated:

use the three-d-asset crate instead

Deserialize the .hdr image resource at the given path into a CpuTexture.

Methods from Deref<Target = RawAssets>

Remove and returns the raw byte array for the resource at the given path.

let mut assets = load(&["test_data/test.png"]).unwrap();
let png_bytes = assets.remove("test.png").unwrap();

Note: If no asset has been inserted with the exact same path given as input, then the first asset which path that contains the path given as input is returned. This means the above example can be reduced to:

let png_bytes = load(&["test_data/test.png"]).unwrap().remove("").unwrap();

Returns a reference to the raw byte array for the resource at the given path.

let mut assets = load(&["test_data/test.png"]).unwrap();
let png_bytes = assets.get("test.png").unwrap();

Note: If no asset has been inserted with the exact same path given as input, then the first asset which path that contains the path given as input is returned. This means the above example can be reduced to:

let png_bytes = load(&["test_data/test.png"]).unwrap().get("").unwrap();

Inserts the given bytes into the set of raw assets. This is useful if you want to add data from an unsuported source and want to use either the RawAssets::deserialize functionality or RawAssets::save functionality.

let mut assets = RawAssets::new();
assets.insert("test.png", png_bytes);
let texture: Texture2D = assets.deserialize("test.png").unwrap();

Inserts all of the given raw assets into this set of raw assets.

Deserialize the asset with the given path into a type that implements the Deserialize trait.

let mut assets = load(&["test_data/test.png"]).unwrap();
let texture: Texture2D = assets.deserialize("test.png").unwrap();

Note: If no asset has been inserted with the exact same path given as input, then the first asset which path that contains the path given as input is deserialized. This means the above example can be reduced to:

let texture: Texture2D = load(&["test_data/test.png"]).unwrap().deserialize("").unwrap();

Saves all of the raw assets to files.

An iterator visiting all pairs of PathBuf (indicating the source or destination path for the raw asset) and Vec<u8> which are the raw serialized bytes.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more