Crate bones_asset
source ·Expand description
An asset interface for Bones.
Re-exports§
pub use anyhow;
pub use dashmap;
Modules§
- General utilities for Bones meta-engine crates.
- The prelude.
Structs§
- Helper type for storing asset extensions.
- An identifier for an asset.
- Context provided to custom asset loaders in the
AssetLoader::load
method. - The progress that has been made loading the game assets.
- Contains that path to an asset, and the pack_dir that it was loaded from.
- A borrowed version of
AssetLoc
. - An asset pack contains assets that are loaded by the game.
- A requirement specifier for an asset pack, made up of the asset pack’s
LabeledId
and it’sVersionReq
. - Specifies an asset pack, and it’s exact version.
- Struct responsible for loading assets into it’s contained
AssetStore
, using anAssetIo
implementation. - The inner state of the asset server.
- Stores assets for later retrieval.
- A unique content ID.
- YAML format for the core asset pack’s
pack.yaml
file. - Dummy
AssetIo
implementation used for debugging or as a placeholder. - Helper for accessing the inner data of a schema ref at runtime.
- Helper for accessing the inner data of a schema ref at runtime.
- Schema data for an enum.
- 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. AssetIo
implementation that loads from the filesystem.- A typed handle to an asset.
- An error returned when an asset pack does not support the game version.
- An asset that has been loaded.
- Struct containing all the game’s loaded assets, including the default assets and asset-packs/mods.
- Context provided while loading a metadata asset.
- Asset handle that may be replicated over network and converted back into
Handle
orUntypedHandle
. - YAML format for asset packs’
pack.yaml
file. - A typed version of
SchemaBox
. - Typed version of a
SchemaMap
. - A typed version of a
SchemaVec
. - Type data for asset handles.
- A owning, type-erased
Box
-like container for types with a [Schema
]. - Schema information describing the memory layout of a type.
- Derivable schema
type_data
for types that implementDeserialize
. - A struct that implements
DeserializeSeed
and can be used to deserialize values matching a given [Schema
]. - Error returned when a field is not found in a schema.
- A unique identifier for a schema registered in the
SCHEMA_REGISTRY
. - Layout information computed for
SchemaData
. - Untyped schema-aware “HashMap”.
- Access helper for a
SchemaMap
. - Mutable
SchemaMap
access helper. - A custom asset loader implementation for a metadata asset.
- Error type when attempting to cast between types with mis-matched schemas.
- A schema reference, containing the ID of the pack that defined the schema, and the name of the schema in the pack.
- The load context for a
SchemaRefMut
. - An untyped reference that knows the [
Schema
] of the pointee and that can be cast to a matching type. - An untyped mutable reference that knows the [
Schema
] of the pointee and that can be cast to a matching type. - A schema registry that alloates
SchemaId
s forSchemaData
s and returns a registered [&'static Schema
][Schema]. - A type-erased
Vec
-like collection that for items with the same [Schema
]. - Access helper for a
SchemaVec
. - Mutable
SchemaVec
access helper. - A field in a
StructSchemaInfo
. - Helper for accessing the inner data of a schema ref at runtime.
- Iterator for
StructRefAccess::fields()
. - A field returned by
StructRefFieldIter
. - Helper for accessing the inner data of a schema ref at runtime.
- Iterator for
StructRefAccess::fields()
. - A field returned by
StructRefFieldIter
. - Schema data for a struct.
- A wrapper struct that marks it unsafe to both create and access the inner value.
- An untyped handle to an asset.
- Information about an enum variant for
EnumSchemaInfo
. - SemVer version as defined by https://semver.org.
- Asset IO implementation that loads assets from a URL.
Enums§
- A [type data][bones_schema::alloc::TypeDatas] that indicates how to load a type as an asset.
- An ID for an asset that has changed.
- A type for an enum tag for
EnumSchemaInfo
. - The index of a field in a struct in a [
Schema
]. - A type of primitive.
- Helper for accessing the inner data of a schema ref at runtime.
- Helper for accessing the inner data of a schema ref at runtime.
- A schema describes the data layout of a type, to enable dynamic access to the type’s data through a pointer.
- Helper for accessing the inner data of a schema ref at runtime.
- Access a schema
Statics§
- The
AssetPackId
of the core pack.
Traits§
- Let
Path
andPathBuf
haveabsolutize
andabsolutize_virtually
method. AssetIo
is a trait that is implemented for backends capable of loading all the games assets and returning the raw bytes stored in asset files.- A custom assset loader.
- Trait implemented for types that can produce an instance of themselves from a Rust type.
- Trait implemented for types that have a [
Schema
].
Functions§
- Helper function to return type data for a custom asset loader.
- Helper function to return type data for a metadata asset.
Type Aliases§
- The unique ID for an asset pack.
- Type alias for
Pin<Box<dyn Future<Output = T> + Send + 'static>>
.
Derive Macros§
- Derive macro for the HasSchema trait.