Skip to main content

OffsetKey

Struct OffsetKey 

Source
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: Encoding

XCDR1 or XCDR2, and which framing the extensibility picks.

§purpose: Purpose

Data or key holder.

§length_codes: LengthCodePolicy

Which length code a @mutable member’s EMHEADER gets, which is four octets of header either way it goes.

§collection_delimiters: CollectionDelimiterPolicy

Which collections carry a delimiter, which is four octets in front of the elements.

§map_delimiter: MapDelimiter

Which of a map’s halves decides whether the map is delimited, which is the same four octets in front of the entries.

§wstring_length: WstringLengthPolicy

How a wstring’s length is counted, which decides the extent of every wstring and so the offset of every member behind one.

§wchar_framing: WcharFraming

How a scalar wchar is framed: GIOP 1.2’s count octet is one octet longer than the unit and aligns to one.

§wchar_width: WcharWidth

How wide a scalar wchar is, which is its alignment as well as its extent.

§pl_cdr1_headers: PlCdr1HeaderPolicy

Which header form a @mutable member takes under XCDR1: four octets against twelve.

§default_extensibility: Extensibility

What an aggregate whose source said nothing is taken to be, which decides whether it carries a delimiter at all.

§key_holder: KeyHolderExtensibility

Whether a key holder keeps the type’s extensibility.

§key_holder_nesting: KeyHolderNesting

How deep a key holder’s member removal reaches.

§key_holder_alignment: KeyHolderAlignment

Whether a key holder’s members are aligned, which moves every offset after the first narrower key.

§enum_holder: EnumHolderWidth

How wide an enumeration’s holder is: one octet against four.

§fixed_digits: FixedDigitCount

Whether 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: MustUnderstandPolicy

Whether 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: MutableUnionFraming

How 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: ShortPidRange

Which member ids fit a short parameter header, which is four octets of header against twelve.

§element_padding: ElementPadding

Whether a collection’s elements carry padding between them, which is the array’s stride and so every element’s offset.

§aggregate_delimiter: AggregateDelimiter

Whether 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.

Trait Implementations§

Source§

impl Clone for OffsetKey

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for OffsetKey

Source§

impl Debug for OffsetKey

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for OffsetKey

Source§

impl Hash for OffsetKey

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for OffsetKey

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for OffsetKey

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for OffsetKey

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for OffsetKey

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.