Expand description
CORBA valuetype wire (§15.3.4) — the self-describing, shared
object encoding. A value instance is written as value_tag + RepositoryId +
state members; the same instance (Rc identity) a second time as an
indirection (value sharing, §15.3.4) — so object graphs with
multiple references are preserved.
§value_tag (§15.3.4.1) — bit layout
Verified against JacORB CDRInputStream (the reference implementation
against which cross-ORB testing is done):
0x00000000— null value.0xffffffff— indirection, followed by alongoffset relative to the position of the offset field (backwards to the targetvalue_tag).0x7fffff00 .. 0x7fffffff— a value follows; flags in the low byte:- Bit 0 (
0x01) — codebase URL present. - Bit 3 (
0x08) — chunked encoding. - Bits 1-2 (
0x06) — type info:0x00none /0x02single RepositoryId /0x06list of RepositoryIds.
- Bit 0 (
Scope of this engine: non-chunked + chunked encoding, single/list
RepositoryId, value sharing (DAG), truncation, nested chunked
values + multi-level end-tags, and codebase URL resolution via a
CodebaseResolver.
Structs§
- Chunked
Node - A node in a chunked valuetype tree (§15.3.4.3) for multi-chunk encoding
via
ValueWriter::write_chunked_tree: a value, its base RepositoryIds (most-derived → base, written in thevalue_taglist), and nested chunked values appended after its state at chunk boundaries. Lets a chunked value carry further chunked values (e.g. a truncatable derived tail) instead of a single flat state chunk. - Value
Reader - Reads valuetype instances with indirection resolution (value sharing): an
indirection yields the same
Rcinstance as the referenced value_tag. - Value
Registry - RepositoryId → state-reader factory. Generated code registers a factory per
valuetype; an optional
CodebaseResolverresolves unknown RepositoryIds via the codebase URL. - Value
Writer - Writes valuetype instances with value sharing: the same
Rcinstance is encoded as an indirection on the second write (one object, not two copies).
Traits§
- Value
Marshal - A concrete valuetype that marshals over the §15.3.4 wire. Generated
code implements this in addition to
ValueBase.
Type Aliases§
- Codebase
Resolver - Codebase resolver: returns — based on the codebase URL carried over the wire (§15.3.4.1, value_tag bit 0) and the RepositoryId — a factory for a valuetype whose factory is not statically registered. This way the codebase URL is taken into account in factory resolution (instead of just being skipped) — the Rust counterpart to the CORBA codebase download.
- Value
Ctor - Factory closure: reads the state members of a valuetype and returns a
typed instance as
Rc<dyn Any>(the caller downcasts to the concrete type).