Skip to main content

Crate bevy_utils

Crate bevy_utils 

Source
Expand description

General utilities for first-party Bevy engine crates.

Modules§

cfg
Configuration information for this crate.
prelude
The utilities prelude.

Macros§

define_atomic_id
Defines a 32-bit id type which guarantees global uniqueness via atomics on a static global.
once
Call some expression only once per call site.

Structs§

BloomFilter
A Bloom filter, parameterized by number of u64 segments N and number of hash functions K.
BufferedChannel
An asynchronous MPSC channel that buffers messages and reuses allocations with thread locals.
BufferedReceiver
A wrapper around a Receiver that returns RecycledVecs to automatically return buffers to the BufferedChannel pool.
BufferedSender
A BufferedChannel sender that buffers messages locally, flushing it when the sender is dropped or BufferedChannel::chunk_size is reached.
DebugName
Wrapper to help debugging ECS issues. This is used to display the names of systems, components, …
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
A cohesive set of thread-local values of a given type.
RecycledVec
A wrapper around a Vec<T> that automatically returns it to the BufferedChannel’s pool when dropped.

Enums§

TypeIdMapEntry
The Entry type for TypeIdMap. Entry for an existing key-value pair in an IndexMap or a vacant location to insert one.

Traits§

PreHashMapExt
Extension methods intended to add functionality to PreHashMap.
TypeIdMapExt
Extension trait to make use of TypeIdMap more ergonomic.

Functions§

default
An ergonomic abbreviation for Default::default() to make initializing structs easier.

Type Aliases§

PreHashMap
A HashMap pre-configured to use Hashed keys and PassHash passthrough hashing. Iteration order only depends on the order of insertions and deletions.
TypeIdMap
A specialized map type with Key of TypeId Iteration order only depends on the order of insertions and deletions.