Skip to main content

union_payload_offset

Function union_payload_offset 

Source
pub fn union_payload_offset(variant: &Type) -> u32
Expand description

Byte offset of a union’s payload within its block: the u32 tag sits at offset 0, then the payload slot at its natural alignment. Every implementation derives it the same way from the selected variant type.