Expand description
General utilities for first-party Bevy engine crates.
Re-exports§
Modules§
- futures
- Utilities for working with
Future
s. - prelude
- The utilities prelude.
- synccell
- A reimplementation of the currently unstable
std::sync::Exclusive
- syncunsafecell
- A reimplementation of the currently unstable
std::cell::SyncUnsafeCell
Macros§
- all_
tuples - 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_foo
providing ident tuples through aritystart..=end
. If you require the length of the tuple, seeall_tuples_with_size!
. - 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, ..)
invokesimpl_foo
providing ident tuples through aritystart..=end
preceded by their length. If you don’t require the length of the tuple, seeall_tuples!
. - debug_
once - Call
debug!
once per call site. - detailed_
trace - Like
tracing::trace
, but conditional on cargo featuredetailed_trace
. - error_
once - Call
error!
once per call site. - info_
once - Call
info!
once per call site. - once
- Call some expression only once per call site.
- trace_
once - Call
trace!
once per call site. - warn_
once - Call
warn!
once per call site.
Structs§
- AHasher
- A
Hasher
for hashing an arbitrary stream of bytes. - Duration
Non-WebAssembly and std
- A
Duration
type to represent a span of time, typically used for system timeouts. - Fixed
State - A hasher builder that will create a fixed hasher.
- Hashed
- A pre-hashed value of a specific type. Pre-hashing enables memoization of hashes that are expensive to compute.
- Instant
Non-WebAssembly and std
- A measurement of a monotonically nondecreasing clock.
Opaque and useful only with
Duration
. - NoOp
Hash BuildHasher
for types that already contain a high-quality hash.- OnDrop
- 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.
- Parallel
std
- A cohesive set of thread-local values of a given type.
- Pass
Hash - A
BuildHasher
that results in aPassHasher
. - Pass
Hasher - A no-op hash that only works on
u64
s. Will panic if attempting to hash a type containing non-u64 fields. - Random
State - 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. - System
Time Non-WebAssembly and std
- A measurement of the system clock, useful for talking to external entities like the file system or other processes.
- System
Time Error Non-WebAssembly and std
- An error returned from the
duration_since
andelapsed
methods onSystemTime
, used to learn how far in the opposite direction a system time lies. - TryFrom
Float Secs Error Non-WebAssembly and std
- An error which can be returned when converting a floating-point value of seconds
into a
Duration
.
Traits§
- Conditional
Send Non-WebAssembly - Use
ConditionalSend
to mark an optional Send trait bound. Useful as on certain platforms (eg. Wasm), futures aren’t Send. - Conditional
Send Future - Use
ConditionalSendFuture
for a future with an optional Send trait bound, as on certain platforms (eg. Wasm), futures aren’t Send. - PreHash
MapExt - Extension methods intended to add functionality to
PreHashMap
.
Functions§
- assert_
object_ safe - Assert that a given
T
is object safe. Will fail to compile if that is not the case. - dbg
- Calls the
tracing::debug!
macro on a value. - default
- An ergonomic abbreviation for
Default::default()
to make initializing structs easier. - error
- Processes a
Result
by calling thetracing::error!
macro in case of anErr
value. - info
- Calls the
tracing::info!
macro on a value. - warn
- Processes a
Result
by calling thetracing::warn!
macro in case of anErr
value.
Type Aliases§
- Boxed
Future alloc
- An owned and dynamically typed Future used when you can’t statically type your result or need to add some indirection.
- Entry
- A shortcut alias for
hashbrown::hash_map::Entry
. - HashMap
- A
HashMap
implementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps. - HashSet
- A
HashSet
implementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps. - PreHash
Map - A
HashMap
pre-configured to useHashed
keys andPassHash
passthrough hashing. Iteration order only depends on the order of insertions and deletions. - Stable
Hash Map Deprecated - A stable hash map implementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps.
- Stable
Hash Set Deprecated - A stable hash set implementing aHash, a high speed keyed hashing algorithm intended for use in in-memory hashmaps.
- Type
IdMap - A specialized hashmap type with Key of
TypeId
Iteration order only depends on the order of insertions and deletions.