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
- The Rust core allocation and collections library
- General utilities for Bones meta-engine crates.
- This module contains types that can be used to implement atomic borrowing.
- Futures, streams, and async I/O combinators.
- Fx Hash
- This crate is a Rust port of Google’s high-performance SwissTable hash map, adapted to make it a drop-in replacement for Rust’s standard
HashMap
andHashSet
types. - This library provides implementations of
Mutex
,RwLock
,Condvar
andOnce
that are smaller, faster and more flexible than those in the Rust standard library. It also provides aReentrantMutex
type. - Convenience re-export of common traits, structs and utils.
- A fast but not cryptographically secure PRNG based on Wyrand.
Macros
- Creates a
SmallVec
containing the arguments.
Structs
- 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. - An iterator that removes the items from a
SmallVec
and yields them by value. - 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. - An iterator that consumes a
SmallVec
and yields its items by value. - A
Ulid
with a human-readable ascii prefix. - Wrapper for a borrowed
AtomicCell
that will released lock on drop. - Wrapper for mutably borrowed
AtomicCell
that will released lock on drop. - A typed version of
SchemaBox
. - Typed version of a
SchemaMap
. - A typed version of a
SchemaVec
. - 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. - Error type when attempting to cast between types with mis-matched schemas.
- 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
Vec
-like container that can store a small number of elements inline. - 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 Ulid is a unique 128-bit lexicographically sortable identifier
- A wrapper struct that marks it unsafe to both create and access the inner value.
- A handle representing a string in the global string cache.
- Information about an enum variant for
EnumSchemaInfo
.
Enums
- Error type for APIs with fallible heap allocation
- A type for an enum tag for
EnumSchemaInfo
. - The index of a field in a struct in a [
Schema
]. - Error creating a
LabeledId
. - Errors that can happen while parsing a
LabeledId
. - This type provides a way to store data to which you either have a reference to or which you do own.
- This type is basically the same as
MaybeOwned
, but works with mutable references. - 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
- Enum for determining the kind of PRNG, whether a fast one, or a slow, possibly crypographically secure one.
Constants
- A fast, non-cryptographic, thread-local random number generator powered by turborand.
Statics
Traits
- Types that can be used as the backing store for a
SmallVec
. - The BitSet API.
- Trait for enabling creating new
TurboCore
instances from an original instance. Similar to cloning, except forking modifies the state of the original instance in order to provide a new, random state for the forked instance. This allows for creating many randomised instances from a single seed in a deterministic manner. - Trait implemented for types that can produce an instance of themselves from a Rust type.
- 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. - Trait implemented for types that have a [
Schema
]. - A marker trait to be applied to anything that implements
TurboCore
in order to indicate that a PRNG source is cryptographically secure, so being a CSPRNG. - Trait for implementing Seedable PRNGs, requiring that the PRNG implements
TurboCore
as a baseline. Seeds must beSized
in order to be used as the internal state of a PRNG. - Convenience trait for constructing a
SmallVec
- Base trait for implementing a PRNG. Only one method must be implemented:
TurboCore::fill_bytes
, which provides the basis for any PRNG, to fill a buffer of bytes with random data. - Extension trait for automatically implementing all
TurboRand
methods, as long as the struct implementsTurboCore
&GenCore
. All methods are provided as default implementations that build on top ofTurboCore
andGenCore
, and thus are not recommended to be overridden, lest you potentially change the expected outcome of the methods. - Extension trait for
Ulid
.
Functions
- An ergonomic abbreviation for
Default::default()
to make initializing structs easier. This is especially helpful when combined with “struct update syntax”. - Shortens a type name to remove all module paths.
- Hints to the compiler that the branch condition is likely to be true. Returns the value passed to it.
- Hints to the compiler that the branch condition is unlikely to be true. Returns the value passed to it.
- Create a new Ustr from the given &str.
Type Aliases
- A
HashMap
implementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps. - A
HashSet
implementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps. - A standard
HashMap
usingUstr
as the key type with a customHasher
that just uses the precomputed hash for speed instead of calculating it - A standard
HashSet
usingUstr
as the key type with a customHasher
that just uses the precomputed hash for speed instead of calculating it