Struct asset_lru::AssetCacheConfigBuilder[][src]

pub struct AssetCacheConfigBuilder { /* fields omitted */ }
Expand description

Builder for AssetCacheConfig.

Implementations

Maximum cost of the bytes cache in bytes.

Maximum cost of the decoded cache in bytes.

Maximum size of a single vec of bytes before we won’t cache it.

Use this to avoid caching huge objects.

Point at which we will avoid caching individual decoded objects.

For example maybe your audio file is 50mb when decoded, and you’d like to not keep it around.

Note that even when we choose not to cache such objects, we still keep them around via weak references, so it’s not always the case that the cache will refuse to give it back to you without decoding a second time.

Builds a new AssetCacheConfig.

Errors

If a required field has not been initialized.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

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.