Expand description
General utilities for first-party Bevy engine crates.
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
HashMapandHashSettypes. - 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.
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, ..)invokesimpl_fooproviding ident tuples through aritystart..=end. - Call
debug!once per call site. - Like
tracing::trace, but conditional on cargo featuredetailed_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
Hasherfor hashing an arbitrary stream of bytes. - A
Durationtype to represent a span of time, typically used for system timeouts. - A
BuildHasherthat results in aEntityHasher. - A very fast hash that is only designed to work on generational indices like
Entity. It will panic if attempting to hash a type containing non-u64 fields. - 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. It also enables faster
PartialEqcomparisons by short circuiting on hash equality. SeePassHashandPassHasherfor a “pass through”BuildHasherandHasherimplementation designed to work withHashedSeePreHashMapfor a hashmap pre-configured to useHashedkeys. - A measurement of a monotonically nondecreasing clock. Opaque and useful only with
Duration. BuildHasherfor 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
BuildHasherthat results in aPassHasher. - A no-op hash that only works on
u64s. Will panic if attempting to hash a type containing non-u64 fields. - 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_sinceandelapsedmethods onSystemTime, 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.
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§
- Use
ConditionalSendto mark an optional Send trait bound. Useful as on certain platforms (eg. WASM), futures aren’t Send. - Use
ConditionalSendFuturefor a future with an optional Send trait bound, as on certain platforms (eg. WASM), futures aren’t Send. - Extension methods intended to add functionality to
PreHashMap.
Functions§
- Calls the
tracing::debug!macro on a value. - 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.
- Calls the
tracing::info!macro on a value.
Type Aliases§
- An owned and dynamically typed Future used when you can’t statically type your result or need to add some indirection.
- A
HashMappre-configured to useEntityHashhashing. Iteration order only depends on the order of insertions and deletions. - A
HashSetpre-configured to useEntityHashhashing. Iteration order only depends on the order of insertions and deletions. - A shortcut alias for
hashbrown::hash_map::Entry. - A
HashMapimplementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps. - A
HashSetimplementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps. - StableHashMapDeprecatedA stable hash map implementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps.
- StableHashSetDeprecatedA 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
TypeIdIteration order only depends on the order of insertions and deletions.