Skip to main content

ProbeRequest

Struct ProbeRequest 

Source
pub struct ProbeRequest {
Show 35 fields pub type_name: String, pub encoding: Encoding, pub endianness: Endianness, pub emit: Emit, 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 wstring_unit_order: WstringUnitOrder, pub pl_cdr1_headers: PlCdr1HeaderPolicy, pub pid_flags: PidFlagPolicy, pub pl_cdr1_reading: PlCdr1Reading, pub encapsulation_ids: EncapsulationIds, pub must_understand: MustUnderstandPolicy, pub enum_holder: EnumHolderWidth, pub union_label: UnionLabelMatch, pub map_entries: MapEntryOrder, pub array_element_flattening: ArrayElementFlattening, pub enumerator_value: EnumeratorValue, pub union_framing: MutableUnionFraming, pub short_pid_range: ShortPidRange, pub fixed_digits: FixedDigitCount, pub default_extensibility: Extensibility, pub key_holder: KeyHolderExtensibility, pub key_holder_nesting: KeyHolderNesting, pub key_holder_order: KeyHolderOrder, pub key_holder_alignment: KeyHolderAlignment, pub defaulted_discriminator_member: DefaultedDiscriminatorMember, pub map_length: MapLengthPolicy, pub element_padding: ElementPadding, pub aggregate_delimiter: AggregateDelimiter, pub sequence_element_delimiter: SequenceElementDelimiter, pub wstring_code_units: WstringCodeUnits,
}
Expand description

One probe run.

Every field a foreign probe also takes, so the four command lines are the same shape. A field that only one implementation understands would make the matrix unreadable.

Fields§

§type_name: String

The type, by scoped name — common::Robot.

§encoding: Encoding

XCDR1 or XCDR2.

§endianness: Endianness

Byte order.

§emit: Emit

What to write out.

§length_codes: LengthCodePolicy

How variable-length @mutable members are framed.

§collection_delimiters: CollectionDelimiterPolicy

Which collections carry a delimiter.

§map_delimiter: MapDelimiter

Which of a map’s halves decides whether the map is delimited.

§wstring_length: WstringLengthPolicy

How a wstring’s length is counted.

§wchar_framing: WcharFraming

How a scalar wchar is framed.

§wchar_width: WcharWidth

How wide a scalar wchar is.

§wstring_unit_order: WstringUnitOrder

In what byte order a wstring’s code units go out.

§pl_cdr1_headers: PlCdr1HeaderPolicy

How a @mutable member is framed under XCDR1.

§pid_flags: PidFlagPolicy

What flags a PL_CDR1 parameter id carries, per position.

§pl_cdr1_reading: PlCdr1Reading

How tolerant the PL_CDR1 reader is of another framing.

§encapsulation_ids: EncapsulationIds

Which table the identifier of an encapsulation header is from.

§must_understand: MustUnderstandPolicy

Whether a member’s must_understand reaches the wire.

§enum_holder: EnumHolderWidth

How wide an enumeration’s holder is.

§union_label: UnionLabelMatch

Whether a negative case label of a narrow signed discriminator selects its branch.

§map_entries: MapEntryOrder

In what order a map’s entries go on the wire.

§array_element_flattening: ArrayElementFlattening

Whether an array’s element is flattened before the delimiter question. See ArrayElementFlattening.

§enumerator_value: EnumeratorValue

Which integer an enumerator serialises as.

§union_framing: MutableUnionFraming

How a @mutable union numbers its branches, and whether its XCDR1 parameter list is terminated.

§short_pid_range: ShortPidRange

Which member ids fit a PL_CDR1 short parameter header.

§fixed_digits: FixedDigitCount

Whether a fixed<P,S> carries its declared digit count or the value’s.

§default_extensibility: Extensibility

What an aggregate whose source said nothing is taken to be.

§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_order: KeyHolderOrder

In what order a key holder’s members are serialized.

§key_holder_alignment: KeyHolderAlignment

Whether a key holder’s members are aligned.

§defaulted_discriminator_member: DefaultedDiscriminatorMember

What becomes of a union’s member when @try_construct(use_default) defaulted its discriminator.

§map_length: MapLengthPolicy

Whether a delimited map also carries an entry count.

§element_padding: ElementPadding

Whether a collection’s elements carry alignment padding between them.

§aggregate_delimiter: AggregateDelimiter

Whether an aggregate’s declared extensibility reaches the wire.

§sequence_element_delimiter: SequenceElementDelimiter

Whether a sequence element of a non-@final type is preceded by its own octet length.

§wstring_code_units: WstringCodeUnits

Which octets stand for a wstring’s characters.

Implementations§

Source§

impl ProbeRequest

Source

pub fn new(type_name: &str, encoding: Encoding, endianness: Endianness) -> Self

A request for type_name in the given encoding and byte order, in the default dialect.

Source

pub fn in_dialect( type_name: &str, encoding: Encoding, endianness: Endianness, dialect: Dialect, ) -> Self

A request with every wire policy taken from one dialect.

Source

pub fn from_key( type_name: &str, key: LayoutKey, map_length: MapLengthPolicy, ) -> Self

A request for type_name planned under key, with map_length standing in for the one framing question key does not answer (see MapLengthPolicy’s own documentation for why the entry count is a codec question and not a layout one).

The field-by-field mapping from a LayoutKey to a ProbeRequest lives here once. Self::in_dialect is this plus the one LayoutKey::in_dialect call a dialect alone needs; a caller that has already built a key — a dialect with axis flags overriding some of its answers, as zerodds_ast_layout::axes produces — calls this directly instead of re-deriving the same fields by hand.

Source

pub fn emitting(self, emit: Emit) -> Self

The same request writing something else out.

Source

pub fn with_pl_cdr1_reading(self, reading: PlCdr1Reading) -> Self

The same request with a PL_CDR1 reader that takes, or reports, a stream in another framing.

Source

pub fn with_encapsulation_ids(self, ids: EncapsulationIds) -> Self

The same request writing the identifiers of an encapsulation header from another table.

Source

pub const fn wire_pl_cdr1_reading(&self) -> WirePlCdr1Reading

How tolerant the PL_CDR1 reader is, as the byte layer names it.

Source

pub fn layout_key(&self, purpose: Purpose) -> LayoutKey

The layout key this request plans under.

One place, so that the write direction, the read direction and the key holder cannot each assemble a slightly different key out of the same fields.

Source

pub fn key_holder_key(&self) -> LayoutKey

The key-holder key this request plans under.

The same dialect as the payload: §7.6.8 fixes the holder’s byte order and encoding, not what an unannotated aggregate inside it is taken to be, and that decides whether the holder carries a DHEADER. A probe that wrote one dialect’s payload and another’s KeyHash would report a divergence of its own making.

Source

pub const fn wchar_width(&self) -> WireWcharWidth

How wide a Char16 is for this request.

Source

pub const fn wire_wchar_framing(&self) -> WireWcharFraming

How a Char16 is framed for this request, as the byte layer names it.

Source

pub const fn wire_wstring_unit_order(&self) -> WireWstringUnitOrder

In what byte order wide code units go out, as the byte layer names it.

Source

pub fn pl_cdr1_framing(&self) -> PlCdr1Framing

How a writer serving this request frames a PL_CDR1 parameter list.

The header form is in the plan, because it changes a member’s extent; these four do not, so they ride on the writer. Both come from the same policy, which is what keeps them agreeing.

Trait Implementations§

Source§

impl Clone for ProbeRequest

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 Debug for ProbeRequest

Source§

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

Formats the value using the given formatter. Read more

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.