Skip to main content

Module erase

Module erase 

Source
Expand description

To improve compile times and code size for the compiler itself, query values are “erased” in some contexts (e.g. inside in-memory cache types), to reduce the number of generic instantiations created during codegen.

See https://github.com/rust-lang/rust/pull/151715 for some bootstrap-time and performance benchmarks.

Macros§

impl_erasable_for_simple_types 🔒
impl_erasable_for_single_lifetime_types 🔒

Structs§

ErasedData
Internal implementation detail of Erased.

Traits§

Erasable
Trait for types that can be erased into Erased<Self>.

Functions§

erase_val
Erases a value of type T into Erased<T>.
restore_val
Restores an erased value to its real type.

Type Aliases§

Erased
A value of T that has been “erased” into some opaque storage type.