It's possible to get Option<ColdString> to be the same size as ColdString by informing the compiler about the available niche of 0 (unless I missed something and 0 is a valid value?).
Can be achieved just by changing
pub struct ColdString([u8; WIDTH]);
to
pub struct ColdString {
ptr: NonNull<usize>,
}
And then updating all other areas accordingly.
It's possible to get
Option<ColdString>to be the same size asColdStringby informing the compiler about the available niche of 0 (unless I missed something and 0 is a valid value?).Can be achieved just by changing
to
And then updating all other areas accordingly.