Expand description

General utilities for Bones meta-engine crates.

Modules

Macros

Structs

  • An iterator that removes the items from a SmallVec and yields them by value.
  • An iterator that consumes a SmallVec and yields its items by value.
  • A Ulid with a human-readable ascii prefix.
  • A Vec-like container that can store a small number of elements inline.
  • A Ulid is a unique 128-bit lexicographically sortable identifier
  • A handle representing a string in the global string cache.

Enums

Constants

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

Traits

  • Types that can be used as the backing store for a SmallVec.
  • 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.
  • 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.
  • 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 be Sized 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 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.
  • 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 using Ustr as the key type with a custom Hasher that just uses the precomputed hash for speed instead of calculating it
  • A standard HashSet using Ustr as the key type with a custom Hasher that just uses the precomputed hash for speed instead of calculating it

Derive Macros

  • Derive macro for deriving Deref on structs with one field.
  • Derive macro for deriving DerefMut on structs with one field.