Crate bevy_utils

Source
Expand description

General utilities for first-party Bevy engine crates.

Re-exports§

Modules§

Macros§

  • Helper macro to generate tuple pyramids. Useful to generate scaffolding to work around Rust lacking variadics. Invoking all_tuples!(impl_foo, start, end, P, Q, ..) invokes impl_foo providing ident tuples through arity start..=end. If you require the length of the tuple, see all_tuples_with_size!.
  • Helper macro to generate tuple pyramids with their length. Useful to generate scaffolding to work around Rust lacking variadics. Invoking all_tuples_with_size!(impl_foo, start, end, P, Q, ..) invokes impl_foo providing ident tuples through arity start..=end preceded by their length. If you don’t require the length of the tuple, see all_tuples!.
  • Call debug! once per call site.
  • Like tracing::trace, but conditional on cargo feature detailed_trace.
  • Call error! once per call site.
  • Call info! once per call site.
  • Call some expression only once per call site.
  • Call trace! once per call site.
  • Call warn! once per call site.

Structs§

  • A Hasher for hashing an arbitrary stream of bytes.
  • DurationNon-WebAssembly and std
    A Duration type to represent a span of time, typically used for system timeouts.
  • A hasher builder that will create a fixed hasher.
  • A pre-hashed value of a specific type. Pre-hashing enables memoization of hashes that are expensive to compute.
  • InstantNon-WebAssembly and std
    A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
  • BuildHasher for types that already contain a high-quality hash.
  • 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 cohesive set of thread-local values of a given type.
  • 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.
  • SystemTimeNon-WebAssembly and std
    A measurement of the system clock, useful for talking to external entities like the file system or other processes.
  • SystemTimeErrorNon-WebAssembly and std
    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.
  • TryFromFloatSecsErrorNon-WebAssembly and std
    An error which can be returned when converting a floating-point value of seconds into a Duration.

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.