Skip to main content

Operation

Struct Operation 

Source
pub struct Operation {
    pub node_id: Option<NodeId>,
    pub name: String,
    pub returns: Option<Id<TypeNode>>,
    pub params: Vec<Parameter>,
    pub raises: Vec<Raise>,
    pub origin: Origin,
    pub mutable: bool,
}
Expand description

One operation of an interface. OMG IDL 4.2 §7.4.3, rule (82).

Fields§

§node_id: Option<NodeId>

Stable identity of the model node, absent for an implied operation, which has no <op_dcl> of its own.

§name: String

Its IDL name, or the implied name of §7.5.1.1.3.

§returns: Option<Id<TypeNode>>

The return type, absent for void.

§params: Vec<Parameter>

Parameters in declaration order.

§raises: Vec<Raise>

The raises clause, in declaration order.

§origin: Origin

Whether the IDL wrote it or §7.5.1.1.3 implied it.

§mutable: bool

Whether it carries @Mutable (DDS-RPC 1.0 §7.5.1.2.1.4): the Enhanced Service Mapping declares its In, Out and Result structures @Extensibility(MUTABLE_EXTENSIBILITY). The Basic mapping ignores it.

Implementations§

Source§

impl Operation

Source

pub fn attribute_name(&self) -> &str

The attribute an implied accessor belongs to: the operation name without the get_attribute_ / set_attribute_ prefix of DDS-RPC 1.0 §7.5.1.1.3 rule 1. For a declared operation, its own name.

Source

pub fn inputs(&self) -> impl Iterator<Item = &Parameter>

The parameters a request carries, in declaration order.

Source

pub fn outputs(&self) -> impl Iterator<Item = &Parameter>

The parameters a reply carries, in declaration order.

Source

pub fn raises_line(&self) -> Option<String>

The raises clause, as one line of prose, or None where the operation raises nothing.

DDS-RPC 1.0 §7.11.1.1.2 rule 6.c keeps the clause out of the C++ signature — “The functions shall not have any exception specification even if the IDL operation has an exception specification” — and §7.11.2 does not override it for Java. It does not say to hide what the IDL declared, and a generated method with neither a throws clause nor a line naming the exceptions would be the one place in the pipeline where a declared raises reaches no output at all.

Source

pub fn has_outputs(&self) -> bool

Whether the reply carries anything beside the return value.

DDS-RPC 1.0 §7.11.1.1.2 rule 7.i turns on this: an operation with out or inout parameters returns future<${interface}_${operation}_Out> and one without returns future<T> or future<void>.

Trait Implementations§

Source§

impl Clone for Operation

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 Operation

Source§

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

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

impl Eq for Operation

Source§

impl PartialEq for Operation

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 Operation

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.