pub enum BitPatternSource {
Int {
octets: u8,
},
Bool,
Float32,
Float64,
}Expand description
What a union branch’s storage octets are read out of.
The Cyclone union overlay (union_negative_selects_nothing): a
discriminator that selects a suppressed negative label makes the
peer write its union storage as the default arm, so the emitted
codec has to produce the value’s storage bits — the u64 whose
little-endian bytes are the value’s little-endian storage octets,
zero-extended. Sign extension is the mistake this enum exists to
prevent: a target with no unsigned types masks, it does not cast.
Variants§
Int
An integer, character, enumeration or bitmask holder of this
many octets. The pattern is the value’s two’s-complement bits,
masked to the width — -2 in four octets is
0x00000000FFFFFFFE. The walk hands the value through the
target’s Int64 cast first, the same seam the enumeration
codec reads its value through, so every target receives its
widest integer and only masks.
Bool
A boolean: one octet, 0 or 1.
Float32
Binary32: the IEEE 754 bits, zero-extended.
Float64
Binary64: the IEEE 754 bits.