Skip to main content

Module niche_cell

Module niche_cell 

Source
Expand description

NicheCell datatype; a wrapper around UnsafeCell<Option<T>> which is designed to take advantage of niche optimization

Authors: MarioS271

Structsยง

NicheCell
A datatype with interior mutability, which can be uninitialized via [Option]. This datatype is designed to be used with values that can take advantage of niche optimization (where the datatype T has a value which is guaranteed to be invalid, like a NonZeroU64 being zero)