Module bevy::utils

source ·
Expand description

Various miscellaneous utilities for easing development

Modules

  • Utilities for working with Futures.
  • 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 and HashSet types.
  • Provides types used to statically intern immutable values.
  • Traits used by label implementations
  • petgraph is a graph data structure library.
  • Small vectors in various sizes. These store a certain number of elements inline, and fall back to the heap for larger allocations. This can be a useful optimization for improving cache locality and reducing allocator traffic for workloads that fit within the inline buffer.
  • A reimplementation of the currently unstable std::sync::Exclusive
  • A reimplementation of the currently unstable std::cell::SyncUnsafeCell
  • A scoped, structured logging and diagnostics system.
  • UUID utilities.

Macros

Structs

  • A Hasher for hashing an arbitrary stream of bytes.
  • A Duration type to represent a span of time, typically used for system timeouts.
  • A hasher builder that will create a fixed hasher.
  • A wrapper for floats that implements Ord, Eq, and Hash traits.
  • A pre-hashed value of a specific type. Pre-hashing enables memoization of hashes that are expensive to compute. It also enables faster PartialEq comparisons by short circuiting on hash equality. See PassHash and PassHasher for a “pass through” BuildHasher and Hasher implementation designed to work with Hashed See PreHashMap for a hashmap pre-configured to use Hashed keys.
  • A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
  • A type which calls a function when dropped. This can be used to ensure that cleanup code is run even in case of a panic.
  • A BuildHasher that results in a PassHasher.
  • A no-op hash that only works on u64s. Will panic if attempting to hash a type containing non-u64 fields.
  • Provides a Hasher factory. This is typically used (e.g. by HashMap) to create AHashers in order to hash the keys of the map. See build_hasher below.
  • A measurement of the system clock, useful for talking to external entities like the file system or other processes.
  • An error returned from the duration_since and elapsed methods on SystemTime, used to learn how far in the opposite direction a system time lies.
  • An error which can be returned when converting a floating-point value of seconds into a Duration.
  • A Universally Unique Identifier (UUID).

Enums

  • Much like a Cow, but owned values are Arc-ed to make clones cheap. This should be used for values that are cloned for use across threads and change rarely (if ever).

Traits

Functions

Type Aliases

  • An owned and dynamically typed Future used when you can’t statically type your result or need to add some indirection.
  • A shortcut alias for hashbrown::hash_map::Entry.
  • 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 HashMap pre-configured to use Hashed keys and PassHash passthrough hashing. Iteration order only depends on the order of insertions and deletions.
  • StableHashMapDeprecated
    A stable hash map implementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps.
  • StableHashSetDeprecated
    A stable hash set implementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps.
  • A specialized hashmap type with Key of TypeId Iteration order only depends on the order of insertions and deletions.