Skip to main content

complex_element

Function complex_element 

Source
pub const fn complex_element(class: u8) -> u8
Expand description

The header a complex array’s elements are matched against.

Synthetic, and by construction not a byte any document can hold. A complex element carries no header at all, so something has to stand for one, and the obvious candidate is unusable: a class header of form COMPLEX_MANY is bit for bit the number header of the same class and width, 0x61 being both a complex array of f64 and a lone f64. This is element_of with TY_UNDEFINED in place of the type, which keeps the class and the width where every reader already looks for them and leaves a byte equal to nothing else at all. So a Vec<f64> cannot bulk-read the payload of a complex array, and nothing has to ask where a header came from to know what it is.