Crate maybe_box

Source
Expand description

Store arbitrary data in the size of a usize, only boxing it if necessary.

Structs§

MaybeBox
Hold a value of type T in the space for a usize, only boxing it if necessary. This can be a useful optimization when dealing with C APIs that allow you to pass around some arbitrary void *-sized piece of data.

Enums§

Unpacked
An unpacked MaybeBox<T>. Produced by MaybeBox::unpack.