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: StringIts 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: OriginWhether the IDL wrote it or §7.5.1.1.3 implied it.
mutable: boolWhether 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
impl Operation
Sourcepub fn attribute_name(&self) -> &str
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.
Sourcepub fn inputs(&self) -> impl Iterator<Item = &Parameter>
pub fn inputs(&self) -> impl Iterator<Item = &Parameter>
The parameters a request carries, in declaration order.
Sourcepub fn outputs(&self) -> impl Iterator<Item = &Parameter>
pub fn outputs(&self) -> impl Iterator<Item = &Parameter>
The parameters a reply carries, in declaration order.
Sourcepub fn raises_line(&self) -> Option<String>
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.
Sourcepub fn has_outputs(&self) -> bool
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>.