Module bevy_ecs::intern

source ·
Expand description

Provides types used to statically intern immutable values.

Interning is a pattern used to save memory by deduplicating identical values, speed up code by shrinking the stack size of large types, and make comparisons for any type as fast as integers.

Structs§

  • An interned value. Will stay valid until the end of the program and will not drop.
  • A thread-safe interner which can be used to create Interned<T> from &T

Traits§