pub struct OffsetKey {Show 20 fields
pub encoding: Encoding,
pub purpose: Purpose,
pub length_codes: LengthCodePolicy,
pub collection_delimiters: CollectionDelimiterPolicy,
pub map_delimiter: MapDelimiter,
pub wstring_length: WstringLengthPolicy,
pub wchar_framing: WcharFraming,
pub wchar_width: WcharWidth,
pub pl_cdr1_headers: PlCdr1HeaderPolicy,
pub default_extensibility: Extensibility,
pub key_holder: KeyHolderExtensibility,
pub key_holder_nesting: KeyHolderNesting,
pub key_holder_alignment: KeyHolderAlignment,
pub enum_holder: EnumHolderWidth,
pub fixed_digits: FixedDigitCount,
pub must_understand: MustUnderstandPolicy,
pub union_framing: MutableUnionFraming,
pub short_pid_range: ShortPidRange,
pub element_padding: ElementPadding,
pub aggregate_delimiter: AggregateDelimiter,
}Expand description
The part of a LayoutKey the plan cache keys on.
A struct and not a tuple, and that is a correction rather than a
style: the tuple stood at twelve, which is where Rust’s derived
Ord, Debug and Clone impls stop, so the next field that had to
go in would not have compiled. A cache key that cannot grow is a
cache key that gets things left out of it, which is the defect
Self::must_understand below records.
A field that reaches TypeLayout and is not here is a silent
wrong plan: the cache would serve one caller’s entry to another
whose answer differs. That is the whole of the rule, and every field
is here because it was checked against it rather than because it
looked relevant.
Fields§
§encoding: EncodingXCDR1 or XCDR2, and which framing the extensibility picks.
purpose: PurposeData or key holder.
length_codes: LengthCodePolicyWhich length code a @mutable member’s EMHEADER gets, which is
four octets of header either way it goes.
collection_delimiters: CollectionDelimiterPolicyWhich collections carry a delimiter, which is four octets in front of the elements.
map_delimiter: MapDelimiterWhich of a map’s halves decides whether the map is delimited,
which is the same four octets in front of the entries.
wstring_length: WstringLengthPolicyHow a wstring’s length is counted, which decides the extent of
every wstring and so the offset of every member behind one.
wchar_framing: WcharFramingHow a scalar wchar is framed: GIOP 1.2’s count octet is one
octet longer than the unit and aligns to one.
wchar_width: WcharWidthHow wide a scalar wchar is, which is its alignment as well as
its extent.
pl_cdr1_headers: PlCdr1HeaderPolicyWhich header form a @mutable member takes under XCDR1: four
octets against twelve.
default_extensibility: ExtensibilityWhat an aggregate whose source said nothing is taken to be, which decides whether it carries a delimiter at all.
key_holder: KeyHolderExtensibilityWhether a key holder keeps the type’s extensibility.
key_holder_nesting: KeyHolderNestingHow deep a key holder’s member removal reaches.
key_holder_alignment: KeyHolderAlignmentWhether a key holder’s members are aligned, which moves every offset after the first narrower key.
enum_holder: EnumHolderWidthHow wide an enumeration’s holder is: one octet against four.
fixed_digits: FixedDigitCountWhether a fixed<P,S> is P digits wide or as wide as the
value, which is the difference between a sized type and an
unbounded one.
must_understand: MustUnderstandPolicyWhether a member’s must_understand attribute is set, which the
plan carries in every MemberHeader it builds.
This was missing, and it was a silent wrong plan. The
attribute is not a length — no offset moves with it — but the
plan is what carries it to all three columns, so a cache that
left it out served a plan built under Declared to a caller that
asked for Omitted and the flag went out anyway. Nothing at run
time would have said so: the bytes would simply have been the
other setting’s. The field was added when
MustUnderstandPolicy::DeclaredAndKey made the gap a third
value wide instead of a second.
union_framing: MutableUnionFramingHow a @mutable union numbers its branches and whether its XCDR1
parameter list is terminated — both of which the plan carries,
the first in every MemberPlan::member_id and the second in
TypeLayout::needs_sentinel.
short_pid_range: ShortPidRangeWhich member ids fit a short parameter header, which is four octets of header against twelve.
element_padding: ElementPaddingWhether a collection’s elements carry padding between them, which is the array’s stride and so every element’s offset.
aggregate_delimiter: AggregateDelimiterWhether an aggregate writes a DHEADER and a @mutable type’s
members carry their headers — both of which the plan carries, the
first in TypeLayout::needs_dheader and Extent::Sized, the
second in every MemberHeader and in TypeLayout::needs_sentinel.