Crate bones_asset

Crate bones_asset 

Source
Expand description

An asset interface for Bones.

Re-exports§

pub use anyhow;
pub use dashmap;

Modules§

bones_utils
General utilities for Bones meta-engine crates.
prelude
The prelude.

Structs§

AssetExtensions
Helper type for storing asset extensions.
AssetInfo
An identifier for an asset.
AssetLoadCtx
Context provided to custom asset loaders in the AssetLoader::load method.
AssetLoadProgress
The progress that has been made loading the game assets.
AssetLoc
Contains that path to an asset, and the pack_dir that it was loaded from.
AssetLocRef
A borrowed version of AssetLoc.
AssetPack
An asset pack contains assets that are loaded by the game.
AssetPackReq
A requirement specifier for an asset pack, made up of the asset pack’s LabeledId and it’s VersionReq.
AssetPackSpec
Specifies an asset pack, and it’s exact version.
AssetServer
Struct responsible for loading assets into it’s contained AssetStore, using an AssetIo implementation.
AssetServerInner
The inner state of the asset server.
AssetStore
Stores assets for later retrieval.
Cid
A unique content ID.
CorePackfileMeta
YAML format for the core asset pack’s pack.yaml file.
DummyIo
Dummy AssetIo implementation used for debugging or as a placeholder.
EnumRefAccess
Helper for accessing the inner data of a schema ref at runtime.
EnumRefMutAccess
Helper for accessing the inner data of a schema ref at runtime.
EnumSchemaInfo
Schema data for an enum.
FieldPath
A wrapper type that implements IntoIterator<Item = FieldIdx> for an inner string to make it easier to use with SchemaRefAccess::field_path() and other field path methods.
FileAssetIo
AssetIo implementation that loads from the filesystem.
Handle
A typed handle to an asset.
IncompatibleGameVersionError
An error returned when an asset pack does not support the game version.
LoadedAsset
An asset that has been loaded.
LoadedAssets
Struct containing all the game’s loaded assets, including the default assets and asset-packs/mods.
MetaAssetLoadCtx
Context provided while loading a metadata asset.
NetworkHandle
Asset handle that may be replicated over network and converted back into Handle or UntypedHandle.
PackfileMeta
YAML format for asset packs’ pack.yaml file.
SBox
A typed version of SchemaBox.
SMap
Typed version of a SchemaMap.
SVec
A typed version of a SchemaVec.
SchemaAssetHandle
Type data for asset handles.
SchemaBox
A owning, type-erased Box-like container for types with a [Schema].
SchemaData
Schema information describing the memory layout of a type.
SchemaDeserialize
Derivable schema type_data for types that implement Deserialize.
SchemaDeserializer
A struct that implements DeserializeSeed and can be used to deserialize values matching a given [Schema].
SchemaFieldNotFoundError
Error returned when a field is not found in a schema.
SchemaId
A unique identifier for a schema registered in the SCHEMA_REGISTRY.
SchemaLayoutInfo
Layout information computed for SchemaData.
SchemaMap
Untyped schema-aware “HashMap”.
SchemaMapAccess
Access helper for a SchemaMap.
SchemaMapMutAccess
Mutable SchemaMap access helper.
SchemaMetaAssetLoader
A custom asset loader implementation for a metadata asset.
SchemaMismatchError
Error type when attempting to cast between types with mis-matched schemas.
SchemaPath
A schema reference, containing the ID of the pack that defined the schema, and the name of the schema in the pack.
SchemaPtrLoadCtx
The load context for a SchemaRefMut.
SchemaRef
An untyped reference that knows the [Schema] of the pointee and that can be cast to a matching type.
SchemaRefMut
An untyped mutable reference that knows the [Schema] of the pointee and that can be cast to a matching type.
SchemaRegistry
A schema registry that alloates SchemaIds for SchemaDatas and returns a registered [&'static Schema][Schema].
SchemaSerializer
A struct that implements Serialize and wraps around a SchemaRef to serialize the value using it’s schema.
SchemaVec
A type-erased Vec-like collection that for items with the same [Schema].
SchemaVecAccess
Access helper for a SchemaVec.
SchemaVecMutAccess
Mutable SchemaVec access helper.
StructFieldInfo
A field in a StructSchemaInfo.
StructRefAccess
Helper for accessing the inner data of a schema ref at runtime.
StructRefFieldIter
Iterator for StructRefAccess::fields().
StructRefFieldIterField
A field returned by StructRefFieldIter.
StructRefMutAccess
Helper for accessing the inner data of a schema ref at runtime.
StructRefMutFieldIter
Iterator for StructRefAccess::fields().
StructRefMutFieldIterField
A field returned by StructRefFieldIter.
StructSchemaInfo
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.
UntypedHandle
An untyped handle to an asset.
VariantInfo
Information about an enum variant for EnumSchemaInfo.
Version
SemVer version as defined by https://semver.org.
WebAssetIo
Asset IO implementation that loads assets from a URL.

Enums§

AssetKind
A type data that indicates how to load a type as an asset.
ChangedAsset
An ID for an asset that has changed.
EnumTagType
A type for an enum tag for EnumSchemaInfo.
FieldIdx
The index of a field in a struct in a [Schema].
Maybe
An equivalent to Option<T> that has a stable memory layout and implements HasSchema.
Primitive
A type of primitive.
PrimitiveRef
Helper for accessing the inner data of a schema ref at runtime.
PrimitiveRefMut
Helper for accessing the inner data of a schema ref at runtime.
SchemaKind
A schema describes the data layout of a type, to enable dynamic access to the type’s data through a pointer.
SchemaRefAccess
Helper for accessing the inner data of a schema ref at runtime.
SchemaRefMutAccess
Access a schema

Statics§

CORE_PACK_ID
The AssetPackId of the core pack.
SCHEMA_REGISTRY
Global SchemaRegistry used to register SchemaDatas and produce [Schema]s.

Traits§

Absolutize
Let Path and PathBuf have absolutize and absolutize_virtually method.
AssetIo
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.
AssetLoader
A custom assset loader.
FromType
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§

AssetPackId
The unique ID for an asset pack.

Derive Macros§

HasSchema
Derive macro for the HasSchema trait.