Skip to main content

ComposeOptions

Struct ComposeOptions 

Source
pub struct ComposeOptions {
    pub default_extensibility: Option<Extensibility>,
    pub hashed_id_advances_the_counter: HashedIdCounter,
    pub hashed_name_spelling: HashedNameSpelling,
    pub key_on_union_discriminator: KeyOnUnionDiscriminator,
    pub include_paths: Vec<PathBuf>,
    pub zero_bound_is_unbounded: bool,
}
Expand description

What the caller decides that the document does not.

The three fields are the three zerodds_idl_compose::ComposeOptions carries that a type document can be affected by. defines has no counterpart: DDS-XML has no preprocessor.

Fields§

§default_extensibility: Option<Extensibility>

What an aggregate of unspecified extensibility is taken to be.

None leaves the facet absent, so “the document said appendable” stays distinguishable from “the document said nothing” and Ast::effective_extensibility applies XTypes 1.3 §7.3.1.2.1.8’s default. What the document did say still wins.

§hashed_id_advances_the_counter: HashedIdCounter

Whether a hashed member id advances the sequential id counter.

The same dialect axis zerodds-idl-compose carries, and here for the same reason: a type declared once in IDL and once in XML has to reach the same member ids, and it cannot if the two load paths answer this differently.

§hashed_name_spelling: HashedNameSpelling

Which spelling of an escaped name a member-id hash reads.

Carried for parity with the IDL path. DDS-XML has no escape underscore — a <member name="long"> writes the name as it is — so no document reaches the axis today.

§key_on_union_discriminator: KeyOnUnionDiscriminator

Whether key="true" on a <discriminator> is carried.

The same axis the IDL path carries for @key in that position, and here for the reason the two above are here: one declaration written twice has to reach one model. DDS-XML documents are the only ones that reach it today — the OMG dds-xtypes suite’s types/xml/unions_key_discriminator.xml is the case.

§include_paths: Vec<PathBuf>

Directories searched for the files an <include> names, after the directory of the document that includes them.

DDS-XTypes 1.3 §7.5.2.2.13: “A collection of URLs to directories to be searched for additional type description documents that may be included, directly or indirectly […] The directory in which the target of document_url resides shall be considered on the inclusion search path implicitly”.

§zero_bound_is_unbounded: bool

Whether a collection bound of 0 means “unbounded”.

DDS-XTypes 1.3 §7.3.2.4: “The literal expression “-1” shall indicate an unbounded collection; no other “negative” value is permitted.“ Zero is not negative, but it is no bound either: IDL 4.2 §7.4.1.4.4.3.1 takes a <positive_int_const> for the bound of a sequence, a string and a map, so a bound of 0 is refused. The OMG dds-xtypes suite writes sequenceMaxLength="0" and comments it “unlimited (0 or -1)”; a caller that loads the suite sets this.

Trait Implementations§

Source§

impl Clone for ComposeOptions

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 ComposeOptions

Source§

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

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

impl Default for ComposeOptions

Source§

fn default() -> Self

Returns the “default value” for a type. 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.