Skip to main content

Module idl

Module idl 

Source
Expand description

The runtime of the code rustorb-idl -brust generates (see docs/rust-mapping.md).

Every IDL type has a descriptor, a type that implements IdlType: it names the Rust type of the values (IdlType::Rust), makes the TypeCode and marshals the values. The types the generator makes for structs, unions, enums, exceptions, interfaces and valuetypes are their own descriptors; the descriptors of the basic and anonymous types are here (Long, WString, Sequence, …), and those of typedefs are in the alias module the generator makes next to them.

The same Rust type can stand for several IDL types (String is both string and wstring, char both char and wchar); the descriptor says which. Any::insert and Any::extract take one.

Structs§

AbstractValue
A value passed as an abstract interface: the instance, and the operations of the interface on it.
Any
any: crate::Any.
Array
T x[N]: [T; N]. A multidimensional array is an array of arrays.
Boolean
boolean: bool.
BoundedSequence
sequence<T, N>: Vec of at most N elements. A longer one is BAD_PARAM when sent and MARSHAL when received.
BoundedString
string<N>: String of at most N characters. A longer one is BAD_PARAM when sent and MARSHAL when received.
BoundedWString
wstring<N>: String of at most N characters.
Char
char: char, one octet in the negotiated char code set; a character that is not is DATA_CONVERSION.
DataInputStream
What a custom valuetype reads its state from (CORBA::DataInputStream).
DataOutputStream
What a custom valuetype writes its state to (CORBA::DataOutputStream): items of IDL types, each written as CDR. Valuetypes written keep their sharing with the rest of the message.
Double
double: f64.
Fixed
fixed<D, S>: crate::Fixed. A value is sent with digits after S cut off; an integer part longer than D - S digits is DATA_CONVERSION.
Float
float: f32.
Long
long: i32.
LongDouble
long double: LongDouble, the binary128 bits.
LongLong
long long: i64.
Object
Object: Option<ObjectRef>, None for a nil reference.
Octet
octet: u8. Sequences and arrays of octets are copied at once.
Sequence
sequence<T>: Vec.
Short
short: i16.
String
string: String.
TypeCodeType
TypeCode: crate::TypeCode.
ULong
unsigned long: u32.
ULongLong
unsigned long long: u64.
UShort
unsigned short: u16.
Upcast
The operations of a derived abstract interface used as those of a base one: the generator implements the servant trait of each abstract interface for Upcast<T> of every T that implements it, so that an Arc<dyn DerivedServant> becomes an Arc<dyn BaseServant> without trait upcasting.
ValueHandle
A shared reference to a valuetype instance.
ValueInfo
What the generated code tells the runtime about a valuetype.
WChar
wchar: char, one UTF-16 code unit; a character outside the Basic Multilingual Plane is DATA_CONVERSION, as is a lone surrogate received.
WString
wstring: String.

Constants§

GENERATED_CODE_VERSION_1
Referred to by every generated file: a generator that writes code for another version of this runtime fails to compile.

Traits§

CustomMarshal
The marshaling of a custom valuetype (CORBA::CustomMarshal), which the application implements for the state struct the generator makes for it: the generated code calls it to write and read the state.
IdlType
The descriptor of an IDL type.
ValueState
The state of a valuetype instance: the struct the generator makes for each valuetype, with the state of its base type as a member.

Functions§

bad_param
BAD_PARAM, not completed: a value that does not fit its type.
data_conversion
DATA_CONVERSION, not completed: a character or a number the type cannot hold.
is_a
Whether obj supports the interface repository_id: from the type id of its IOR when it is that one, else by asking the object (_is_a).
read_abstract
Reads the abstract interface abstract_id: an object reference made into an A by object, a value made into one by supported, or None for a nil reference or a null value. A value of a type that is not known to support the interface is MARSHAL.
read_abstract_value
Reads a value of the abstract valuetype or interface abstract_id: as a ValueBase, made into an A by supported. A value of a type that is not known to derive from it (or support it) is MARSHAL.
read_box
Reads a value box of the type id, holding a T, or null.
read_len
Reads the length of a sequence whose elements take at least min_size octets.
register_supported
Records that the valuetype value_id supports the abstract interface abstract_id, and how its instances become the generated enum of the interface. Instances of types derived from value_id are turned the same way.
register_value
Makes the valuetype info known to every ORB of the process, so that a value of it is read as itself where a base type of it is expected (rather than truncated). Its TypeCode is registered for anys as well (crate::register_value_type). Generated files have a register_value_types function that registers all of theirs.
simple_tc
The TypeCode of a basic type.
supported
The instance v as the abstract interface abstract_id (its enum A), if its type or a base type of it was registered as supporting it with register_supported.
system_exception
The system exception a call that raises no user exceptions fails with: a user exception is UNKNOWN (minor UNLISTED_USER_EXCEPTION).
tc
Unwraps the result of making a TypeCode the generator checked.
unknown_operation
BAD_OPERATION with minor UNKNOWN_OPERATION: what a skeleton returns for an operation the interface does not have.
unlisted_user_exception
UNKNOWN with minor UNLISTED_USER_EXCEPTION, for a user exception the operation does not raise.
write_abstract_object
Writes an abstract interface as the object reference obj (TRUE and the IOR); None is the nil reference.
write_abstract_value
Writes an abstract interface as the value v (FALSE and the value).
write_box
Writes the value box v of the type id, holding a T, or null.

Type Aliases§

SupportedFn
Turns an instance into the enum of an abstract interface it supports (as a Box<dyn Any>), or None if it is not of the valuetype.
Sys
The result of marshalling.