Expand description
Load and store assets and resources for Apps.
Modules
Macros
- Loads an “internal” asset by embedding the string stored in the given
path_str
and associates it with the given handle. - Loads an “internal” binary asset by embedding the bytes stored in the given
path_str
and associates it with the given handle.
Structs
- Provides
Handle
andUntypedHandle
for a specific asset type. This should only be used for one specific asset type. - Represents a path to an asset in a “virtual filesystem”.
- Loads and tracks the state of
Asset
values from a configuredAssetReader
. This can be used to kick off new asset loads and retrieve their current load states. - A mutable iterator over
Assets
. - A “type erased / boxed” counterpart to
LoadedAsset
. This is used in places where the loaded type is not statically known. - A context that provides access to assets in
AssetLoader
s, tracks dependencies, and collects asset load state. Any asset state accessed byLoadContext
will be tracked and stored for use in dependency events and asset preprocessing. - An error that occurs when attempting to call
LoadContext::load_direct
- The successful result of an
AssetLoader::load
call. This contains the loaded “root” asset and any other “labeled” assets produced by the loader. It also holds the inputAssetMeta
(if it exists) and tracks dependencies: - A “loaded folder” containing handles for all assets stored in a given
AssetPath
. - An error that occurs when an
AssetLoader
is not registered for a given extension. - An error that occurs when an
AssetLoader
is not registered for a givenstd::any::type_name
. - Type data for the
TypeRegistry
used to operate on reflectedAsset
s. - Reflect type data struct relating a
Handle<T>
back to theT
asset type. - The internal “strong”
Asset
handle storage forHandle::Strong
andUntypedHandle::Strong
. When this is dropped, theAsset
will be freed. It also stores some asset metadata for easy access from handles. - A system set that holds all “track asset” operations.
- Schedule where
Assets
resources are updated.
Enums
- Events that occur for a specific
Asset
, such as “value changed” events and “dependency” events. - An error that occurs during an
Asset
load. - An error encountered during
AssetLoader::load
. - Provides “asset” loading and processing functionality. An
Asset
is a “runtime value” that is loaded from anAssetProvider
, which can be something like a filesystem, a network, etc. - The load state of an asset’s dependencies.
- An error that occurs while deserializing
AssetMeta
. - A strong or weak handle to a specific
Asset
. If aHandle
isHandle::Strong
, theAsset
will be kept alive until theHandle
is dropped. If aHandle
isHandle::Weak
, it does not necessarily reference a liveAsset
, nor will it keep assets alive. - The load state of an asset.
- An error produced when calling
LoadContext::read_asset_bytes
- The recursive load state of an asset’s dependencies.
Traits
- Adds asset-related builder methods to
App
. - Loads an
Asset
from a given byteReader
. This can acceptAssetLoader::Settings
, which configure how theAsset
should be loaded. - Extension trait for [
AsyncRead
]. - Extension trait for [
AsyncWrite
]. - Provides type-erased access to an
AssetLoader
.
Functions
- A system that manages internal
AssetServer
events, such as finalizing asset loads.
Type Definitions
- An owned and dynamically typed Future used when you can’t statically type your result or need to add some indirection.