wasmtime_environ

Module packed_option

source
Expand description

Compact representation of Option<T> for types with a reserved value.

Small Cranelift types like the 32-bit entity references are often used in tables and linked lists where an Option<T> is needed. Unfortunately, that would double the size of the tables because Option<T> is twice as big as T.

This module provides a PackedOption<T> for types that have a reserved value that can be used to represent None.

Structs§

Traits§

  • Types that have a reserved value which can’t be created any other way.