fn write_size_of_layout(
    w: &mut Buffer,
    layout: &LayoutS<VariantIdx>,
    tag_size: u64
)