Expand description
The prelude.
Re-exports§
pub use crate::FromWorld;pub use crate::UnwrapMany;pub use crate::World;pub use bones_schema;pub use crate::bitset::*;pub use crate::components::*;pub use crate::entities::*;pub use crate::resources::*;pub use crate::stage::CoreStage::*;pub use crate::stage::*;pub use crate::system::*;
Modules§
- bones_
utils - General utilities for Bones meta-engine crates.
- borrow
- This module contains types that can be used to implement atomic borrowing.
Structs§
- Atomic
Cell - A mutable memory location with dynamically checked borrow rules
This type behaves mostly like
core::cell::RefCell. The main difference is that this type uses atomic operations for borrowing. Thus allowing to use it in multi-threaded environment. - 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. - Labeled
Id - A
Ulidwith a human-readable ascii prefix. - Ref
- Wrapper for a borrowed
AtomicCellthat will released lock on drop. - RefMut
- Wrapper for mutably borrowed
AtomicCellthat will released lock on drop. - SBox
- A typed version of
SchemaBox. - SMap
- Typed version of a
SchemaMap. - SVec
- A typed version of a
SchemaVec. - 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
Mismatch Error - Error type when attempting to cast between types with mis-matched schemas.
- 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.
- Variant
Info - Information about an enum variant for
EnumSchemaInfo.
Enums§
- Enum
TagType - A type for an enum tag for
EnumSchemaInfo. - Field
Idx - The index of a field in a struct in a [
Schema]. - Labeled
IdCreate Error - Error creating a
LabeledId. - Labled
IdParse Error - Errors that can happen while parsing a
LabeledId. - 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
Constants§
- THREAD_
RNG - A fast, non-cryptographic, thread-local random number generator powered by turborand.
Statics§
- SCHEMA_
REGISTRY - Global
SchemaRegistryused to registerSchemaDatas and produce [Schema]s.
Traits§
- BitSet
- The BitSet API.
- From
Type - Trait implemented for types that can produce an instance of themselves from a Rust type.
- GenCore
- This trait provides the means to easily generate all integer types, provided
the main method underpinning this is implemented:
GenCore::gen. Once implemented, the rest of the trait provides default implementations for generating all integer types, though it is not recommended to override these. - HasSchema
- Trait implemented for types that have a [
Schema]. - Turbo
Rand - Extension trait for automatically implementing all
TurboRandmethods, as long as the struct implements [TurboCore] &GenCore. All methods are provided as default implementations that build on top of [TurboCore] andGenCore, and thus are not recommended to be overridden, lest you potentially change the expected outcome of the methods. - UlidExt
- Extension trait for
Ulid.
Functions§
- default
- An ergonomic abbreviation for
Default::default()to make initializing structs easier. This is especially helpful when combined with “struct update syntax”. - get_
short_ name - Shortens a type name to remove all module paths.
- likely
- Hints to the compiler that the branch condition is likely to be true. Returns the value passed to it.
- unlikely
- Hints to the compiler that the branch condition is unlikely to be true. Returns the value passed to it.
Type Aliases§
- HashMap
- A [
HashMap][hashbrown::HashMap] implementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps. - HashSet
- A [
HashSet][hashbrown::HashSet] implementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps.