Skip to main content

MaybeHasNiche

Derive Macro MaybeHasNiche 

Source
#[derive(MaybeHasNiche)]
Expand description
use object_rainbow::{MaybeHasNiche, Size};

#[derive(Size, MaybeHasNiche)]
struct WithHole(bool, u8);

#[derive(Size, MaybeHasNiche)]
struct NoHole(u8, u8);

assert_eq!(Option::<WithHole>::SIZE, 2);
assert_eq!(Option::<NoHole>::SIZE, 3);