Module prelude

Module prelude 

Source
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§

AtomicCell
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.
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.
LabeledId
A Ulid with a human-readable ascii prefix.
Ref
Wrapper for a borrowed AtomicCell that will released lock on drop.
RefMut
Wrapper for mutably borrowed AtomicCell that will released lock on drop.
SBox
A typed version of SchemaBox.
SMap
Typed version of a SchemaMap.
SVec
A typed version of a SchemaVec.
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.
SchemaMismatchError
Error type when attempting to cast between types with mis-matched schemas.
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.
VariantInfo
Information about an enum variant for EnumSchemaInfo.

Enums§

EnumTagType
A type for an enum tag for EnumSchemaInfo.
FieldIdx
The index of a field in a struct in a [Schema].
LabeledIdCreateError
Error creating a LabeledId.
LabledIdParseError
Errors that can happen while parsing a LabeledId.
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

Constants§

THREAD_RNG
A fast, non-cryptographic, thread-local random number generator powered by turborand.

Statics§

SCHEMA_REGISTRY
Global SchemaRegistry used to register SchemaDatas and produce [Schema]s.

Traits§

BitSet
The BitSet API.
FromType
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].
TurboRand
Extension trait for automatically implementing all TurboRand methods, as long as the struct implements [TurboCore] & GenCore. All methods are provided as default implementations that build on top of [TurboCore] and GenCore, 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.

Derive Macros§

Deref
Derive macro for deriving Deref on structs with one field.
DerefMut
Derive macro for deriving DerefMut on structs with one field.
HasSchema
Derive macro for the HasSchema trait.
SystemParam