Macros§
- asset
- Declares a file and returns its
Assethandle. - asset_
options - Build an
AssetOptionsfrom a comma-separated list of fields.
Structs§
- Asset
- A handle to a file declared with
asset!. - Asset
Bundle - A directory of bundled files and the catalog used to look them up.
- Asset
Catalog - The mapping from
AssetIds to their bundled filenames and content types. - Asset
Config - The catalog and host used to resolve asset URLs.
- AssetId
- Compact identifier for an asset declared via
asset!. - Asset
Options - Options that control how an asset is bundled.
- Asset
Route serve - A
Routethat serves a single bundled asset from disk. - Bundle
Events bundler - The set of
BundleSubscribers a bundler reports to. - Bundled
Asset - A single entry inside an
AssetCatalog. - Bundler
bundler - Scans a built binary for
asset!declarations and writes the referenced files into a bundle directory. - Bundler
Config bundler - Settings for a
Bundler. - Const
Reader - Const-friendly cursor for reading primitives out of a byte buffer.
- Const
Writer - Const-friendly cursor for writing primitives into a fixed byte buffer.
- Manifest
- On-disk index of a bundle directory, mapping
AssetIds to files. - Manifest
Entry - One row in a
Manifest: an asset ID, its bundled filename, the SHA-256 hex digest of the file’s contents, and theContent-Typeit is served with. - RawAsset
- An asset declaration recovered from a compiled binary.
Enums§
- Asset
Error - Errors that can occur while reading assets or manifests.
- Bundle
Error bundler - Errors that can occur while bundling assets out of a binary.
- Bundle
Event bundler - A step the
Bundlertook while syncing assets. - Parse
Manifest Error - Errors from parsing a
Manifestout of its TOML source. - Source
- Where an asset’s bytes come from: a local file or a remote URL.
Constants§
- DEFAULT_
CONNECT_ TIMEOUT bundler - Limit for establishing a connection when
connect_timeoutis unset. - DEFAULT_
PARALLELISM bundler - Number of assets processed at once when
parallelismis unset. - DEFAULT_
TIMEOUT bundler - Wall-clock limit for a single download when
timeoutis unset. - ENCODED_
ASSET_ SIZE - Size in bytes of one encoded asset declaration embedded into the binary.
- MANIFEST_
NAME - Filename of the manifest within a bundle directory.
- MANIFEST_
VERSION - Current on-disk manifest format version.
Traits§
- Bundle
Subscriber bundler - A consumer of
BundleEvents, registered withBundlerConfig::subscribe. - Router
Builder Asset Ext router - Registers assets on a
RouterBuilder.
Functions§
- asset_
config - Returns the
AssetConfigregistered as app context for this context. - bundled_
asset - Resolves an
Assetto itsBundledAssetin the context’s registeredAssetConfig.
Type Aliases§
- Bundle
Result bundler - Result