Skip to main content

InterfaceError

Enum InterfaceError 

Source
pub enum InterfaceError {
    ForwardWithoutDefinition {
        name: String,
    },
    NoNode {
        kind: &'static str,
        at: String,
    },
    Unresolved {
        construct: &'static str,
        at: String,
    },
    TooDeep {
        name: String,
        limit: usize,
    },
    OutsideServiceGrammar {
        construct: &'static str,
        at: String,
    },
    DuplicateOperation {
        interface: String,
        name: String,
    },
    DuplicateParameter {
        at: String,
        name: String,
    },
}
Expand description

Why an interface did not reach the seam.

Four failures, each of which used to be a construct that reached no output and said nothing about it.

Variants§

§

ForwardWithoutDefinition

interface I; with no interface I { … }; anywhere in the unit.

DDS-TS 1.0 §11.7 makes this fatal and names it DDS-TS-E002. The C++ and Java bindings have the same hole for the same reason: a Requester<I_Request, I_Reply> over an interface whose operations never arrived is a class over two structs with no members.

Fields

§name: String

The interface’s IDL name.

§

NoNode

The model lists a child and then will not hand it over.

Fields

§kind: &'static str

What was asked for: "operation", "parameter", "attribute", "base interface" or "exception".

§at: String

Where it sits, as far as the model names it.

§

Unresolved

A reference the output has to name is not resolved.

A return type, a parameter type, an attribute type, a base interface or a raises entry. Emitting the operation without it would produce a method with a parameter missing, which no compiler on the far side can tell from one the IDL declared that way.

Fields

§construct: &'static str

What does not resolve, in the source’s terms.

§at: String

Where it sits, as far as the model names it.

§

TooDeep

The base chain is deeper than the walk follows.

Stopping there quietly would drop the operations and attributes of every base past the limit from the flattened binding.

Fields

§name: String

The interface whose chain exceeded the limit.

§limit: usize

The limit.

§

OutsideServiceGrammar

A construct DDS-RPC 1.0 §7.3.1.1 removed from the service grammar: a oneway operation (production 87 and §7.5.1.1.7 rule 5, which wants a Return-union case for every operation), a context clause, an interface form other than interface (production 7), an import/typeid/typeprefix directive (productions 1 and 2), or a type, constant or exception declaration in an interface body (production 9).

Fields

§construct: &'static str

The construct, in the spec’s terms.

§at: String

Where it sits.

§

DuplicateOperation

Two operations of one interface carry the same name. Covers the operations §7.5.1.1.3 rule 1 implies for an attribute: “It is illegal to have an interface with an attribute named <attribute-name> and user-defined operations named get_attribute_<attribute-name> and set_attribute_<attribute-name>.”

Fields

§interface: String

The interface.

§name: String

The colliding operation name.

§

DuplicateParameter

Two parameters of one operation carry the same name.

Fields

§at: String

<interface>::<operation>.

§name: String

The colliding parameter name.

Trait Implementations§

Source§

impl Clone for InterfaceError

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 InterfaceError

Source§

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

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

impl Display for InterfaceError

Source§

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

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

impl Eq for InterfaceError

Source§

impl Error for InterfaceError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<InterfaceError> for BindingError

Source§

fn from(error: InterfaceError) -> Self

Converts to this type from the input type.
Source§

impl From<InterfaceError> for RustInterfaceError

Source§

fn from(error: InterfaceError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for InterfaceError

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 StructuralPartialEq for InterfaceError

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.