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§
- Abstract
Value - 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.- Bounded
Sequence sequence<T, N>:Vecof at mostNelements. A longer one isBAD_PARAMwhen sent andMARSHALwhen received.- Bounded
String string<N>:Stringof at mostNcharacters. A longer one isBAD_PARAMwhen sent andMARSHALwhen received.- BoundedW
String wstring<N>:Stringof at mostNcharacters.- Char
char:char, one octet in the negotiatedcharcode set; a character that is not isDATA_CONVERSION.- Data
Input Stream - What a custom valuetype reads its state from (
CORBA::DataInputStream). - Data
Output Stream - 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 afterScut off; an integer part longer thanD - Sdigits isDATA_CONVERSION.- Float
float:f32.- Long
long:i32.- Long
Double long double:LongDouble, the binary128 bits.- Long
Long long long:i64.- Object
Object:Option<ObjectRef>,Nonefor 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.- Type
Code Type TypeCode:crate::TypeCode.- ULong
unsigned long:u32.- ULong
Long 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 everyTthat implements it, so that anArc<dyn DerivedServant>becomes anArc<dyn BaseServant>without trait upcasting. - Value
Handle - A shared reference to a valuetype instance.
- Value
Info - 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 isDATA_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§
- Custom
Marshal - 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.
- Value
State - 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
objsupports the interfacerepository_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 anAbyobject, a value made into one bysupported, orNonefor a nil reference or a null value. A value of a type that is not known to support the interface isMARSHAL. - read_
abstract_ value - Reads a value of the abstract valuetype or interface
abstract_id: as aValueBase, made into anAbysupported. A value of a type that is not known to derive from it (or support it) isMARSHAL. - read_
box - Reads a value box of the type
id, holding aT, ornull. - read_
len - Reads the length of a sequence whose elements take at least
min_sizeoctets. - register_
supported - Records that the valuetype
value_idsupports the abstract interfaceabstract_id, and how its instances become the generated enum of the interface. Instances of types derived fromvalue_idare turned the same way. - register_
value - Makes the valuetype
infoknown 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 aregister_value_typesfunction that registers all of theirs. - simple_
tc - The TypeCode of a basic type.
- supported
- The instance
vas the abstract interfaceabstract_id(its enumA), if its type or a base type of it was registered as supporting it withregister_supported. - system_
exception - The system exception a call that raises no user exceptions fails
with: a user exception is
UNKNOWN(minorUNLISTED_USER_EXCEPTION). - tc
- Unwraps the result of making a TypeCode the generator checked.
- unknown_
operation BAD_OPERATIONwith minorUNKNOWN_OPERATION: what a skeleton returns for an operation the interface does not have.- unlisted_
user_ exception UNKNOWNwith minorUNLISTED_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);Noneis the nil reference. - write_
abstract_ value - Writes an abstract interface as the value
v(FALSE and the value). - write_
box - Writes the value box
vof the typeid, holding aT, ornull.
Type Aliases§
- Supported
Fn - Turns an instance into the enum of an abstract interface it supports
(as a
Box<dyn Any>), orNoneif it is not of the valuetype. - Sys
- The result of marshalling.