pub struct TypeLayout {
pub type_: NodeId,
pub align: u8,
pub extent: Extent,
pub needs_dheader: bool,
pub needs_sentinel: bool,
pub discriminator: Option<MemberHeader>,
pub members: Vec<MemberPlan>,
}Expand description
A type’s wire layout under one key.
Fields§
§type_: NodeIdThe type this plan is for.
align: u8The alignment the whole type requires.
extent: ExtentHow much space it takes.
needs_dheader: boolWhether a DHEADER precedes the members. XCDR2 only.
needs_sentinel: boolWhether a PID_LIST_END sentinel terminates the parameter list.
PL_CDR1 only; XTypes 1.3 §7.4.1.2.4.
discriminator: Option<MemberHeader>How a @mutable union’s discriminator is framed, and None
everywhere else.
Rules (27) and (28) frame a @mutable union’s discriminator
exactly like a member — an MMEMBER at member id 0 — but a
discriminator is not a member node, so there is nothing for a
MemberPlan to name. It gets a field of its own rather than a
synthetic MemberPlan, because a synthetic node id is a thing
every consumer would have to know not to look up.
members: Vec<MemberPlan>The members, in wire order.
For a union these are the case members, one per case, and only
the selected one is written. Populated only for a @mutable
union: rules (26) and (30) give a union of any other
extensibility no per-member framing to plan.