Expand description
An asset interface for Bones.
Re-exports§
Modules§
- bones_
utils - General utilities for Bones meta-engine crates.
- prelude
- The prelude.
Structs§
- Asset
Extensions - Helper type for storing asset extensions.
- Asset
Info - An identifier for an asset.
- Asset
Load Ctx - Context provided to custom asset loaders in the
AssetLoader::loadmethod. - Asset
Load Progress - The progress that has been made loading the game assets.
- Asset
Loc - Contains that path to an asset, and the pack_dir that it was loaded from.
- Asset
LocRef - A borrowed version of
AssetLoc. - Asset
Pack - An asset pack contains assets that are loaded by the game.
- Asset
Pack Req - A requirement specifier for an asset pack, made up of the asset pack’s
LabeledIdand it’sVersionReq. - Asset
Pack Spec - Specifies an asset pack, and it’s exact version.
- Asset
Server - Struct responsible for loading assets into it’s contained
AssetStore, using anAssetIoimplementation. - Asset
Server Inner - The inner state of the asset server.
- Asset
Store - Stores assets for later retrieval.
- Cid
- A unique content ID.
- Core
Packfile Meta - YAML format for the core asset pack’s
pack.yamlfile. - DummyIo
- Dummy
AssetIoimplementation used for debugging or as a placeholder. - Enum
RefAccess - Helper for accessing the inner data of a schema ref at runtime.
- Enum
RefMut Access - Helper for accessing the inner data of a schema ref at runtime.
- Enum
Schema Info - Schema data for an enum.
- Field
Path - A wrapper type that implements
IntoIterator<Item = FieldIdx>for an inner string to make it easier to use withSchemaRefAccess::field_path()and other field path methods. - File
Asset Io AssetIoimplementation that loads from the filesystem.- Handle
- A typed handle to an asset.
- Incompatible
Game Version Error - An error returned when an asset pack does not support the game version.
- Loaded
Asset - An asset that has been loaded.
- Loaded
Assets - Struct containing all the game’s loaded assets, including the default assets and asset-packs/mods.
- Meta
Asset Load Ctx - Context provided while loading a metadata asset.
- Network
Handle - Asset handle that may be replicated over network and converted back into
HandleorUntypedHandle. - Packfile
Meta - YAML format for asset packs’
pack.yamlfile. - SBox
- A typed version of
SchemaBox. - SMap
- Typed version of a
SchemaMap. - SVec
- A typed version of a
SchemaVec. - Schema
Asset Handle - Type data for asset handles.
- Schema
Box - A owning, type-erased
Box-like container for types with a [Schema]. - Schema
Data - Schema information describing the memory layout of a type.
- Schema
Deserialize - Derivable schema
type_datafor types that implementDeserialize. - Schema
Deserializer - A struct that implements
DeserializeSeedand can be used to deserialize values matching a given [Schema]. - Schema
Field NotFound Error - Error returned when a field is not found in a schema.
- Schema
Id - A unique identifier for a schema registered in the
SCHEMA_REGISTRY. - Schema
Layout Info - Layout information computed for
SchemaData. - Schema
Map - Untyped schema-aware “HashMap”.
- Schema
MapAccess - Access helper for a
SchemaMap. - Schema
MapMut Access - Mutable
SchemaMapaccess helper. - Schema
Meta Asset Loader - A custom asset loader implementation for a metadata asset.
- Schema
Mismatch Error - Error type when attempting to cast between types with mis-matched schemas.
- Schema
Path - A schema reference, containing the ID of the pack that defined the schema, and the name of the schema in the pack.
- Schema
PtrLoad Ctx - The load context for a
SchemaRefMut. - Schema
Ref - An untyped reference that knows the [
Schema] of the pointee and that can be cast to a matching type. - Schema
RefMut - An untyped mutable reference that knows the [
Schema] of the pointee and that can be cast to a matching type. - Schema
Registry - A schema registry that alloates
SchemaIds forSchemaDatas and returns a registered [&'static Schema][Schema]. - Schema
Serializer - A struct that implements
Serializeand wraps around aSchemaRefto serialize the value using it’s schema. - Schema
Vec - A type-erased
Vec-like collection that for items with the same [Schema]. - Schema
VecAccess - Access helper for a
SchemaVec. - Schema
VecMut Access - Mutable
SchemaVecaccess helper. - Struct
Field Info - A field in a
StructSchemaInfo. - Struct
RefAccess - Helper for accessing the inner data of a schema ref at runtime.
- Struct
RefField Iter - Iterator for
StructRefAccess::fields(). - Struct
RefField Iter Field - A field returned by
StructRefFieldIter. - Struct
RefMut Access - Helper for accessing the inner data of a schema ref at runtime.
- Struct
RefMut Field Iter - Iterator for
StructRefAccess::fields(). - Struct
RefMut Field Iter Field - A field returned by
StructRefFieldIter. - Struct
Schema Info - Schema data for a struct.
- Ulid
- A Ulid is a unique 128-bit lexicographically sortable identifier
- Unsafe
- A wrapper struct that marks it unsafe to both create and access the inner value.
- Untyped
Handle - An untyped handle to an asset.
- Variant
Info - Information about an enum variant for
EnumSchemaInfo. - Version
- SemVer version as defined by https://semver.org.
- WebAsset
Io - Asset IO implementation that loads assets from a URL.
Enums§
- Asset
Kind - A type data that indicates how to load a type as an asset.
- Changed
Asset - An ID for an asset that has changed.
- Enum
TagType - A type for an enum tag for
EnumSchemaInfo. - Field
Idx - The index of a field in a struct in a [
Schema]. - Maybe
- An equivalent to
Option<T>that has a stable memory layout and implementsHasSchema. - Primitive
- A type of primitive.
- Primitive
Ref - Helper for accessing the inner data of a schema ref at runtime.
- Primitive
RefMut - Helper for accessing the inner data of a schema ref at runtime.
- Schema
Kind - A schema describes the data layout of a type, to enable dynamic access to the type’s data through a pointer.
- Schema
RefAccess - Helper for accessing the inner data of a schema ref at runtime.
- Schema
RefMut Access - Access a schema
Statics§
- CORE_
PACK_ ID - The
AssetPackIdof the core pack. - SCHEMA_
REGISTRY - Global
SchemaRegistryused to registerSchemaDatas and produce [Schema]s.
Traits§
- Absolutize
- Let
PathandPathBufhaveabsolutizeandabsolutize_virtuallymethod. - AssetIo
AssetIois a trait that is implemented for backends capable of loading all the games assets and returning the raw bytes stored in asset files.- Asset
Loader - A custom assset loader.
- From
Type - Trait implemented for types that can produce an instance of themselves from a Rust type.
- HasSchema
- Trait implemented for types that have a [
Schema].
Functions§
- asset_
loader - Helper function to return type data for a custom asset loader.
- metadata_
asset - Helper function to return type data for a metadata asset.
Type Aliases§
- Asset
Pack Id - The unique ID for an asset pack.
Derive Macros§
- HasSchema
- Derive macro for the HasSchema trait.