pub enum WstringUnitOrder {
Stream,
BigEndianAlways,
ByteOrderMark,
HostUnswapped,
}Expand description
In what byte order a wstring’s code units go out — C4.
The byte-layer half of zerodds_ast_layout::WstringUnitOrder, which
carries the runs. Read by Writer::write_wstring and
Reader::read_wstring for a wstring’s units, and by
Writer::write_wchar for a scalar, where CORBA gives the mark no
place to ride and Self::ByteOrderMark therefore degrades to
big-endian.
A fourth axis and not a fourth coordinate of
WstringLengthPolicy: it crosses the length convention rather
than extending it. omniORB’s mark rides on an octet count and
nothing stops a GIOP 1.1 character count from carrying one too, so
folding the order in would give eight variants for two questions —
which is how UnswappedUnits, a byte order wearing a length
policy’s name, came to exist.
Variants§
Stream
The stream’s own byte order. XTypes §7.4.1.1.2 through ESWAP.
BigEndianAlways
UTF-16 big-endian whatever the stream says. What omniORB and JacORB decode in the absence of a byte-order mark.
ByteOrderMark
A byte-order mark, then the units, both little-endian. omniORB.
HostUnswapped
The units always little-endian, no mark. Cyclone’s big-endian
output, and rosidl_typesupport_fastrtps’s over four-octet
units. Arrived as a value of the length policy — a byte order
wearing a length’s name — and belongs on this axis.
Implementations§
Source§impl WstringUnitOrder
impl WstringUnitOrder
Sourcepub const fn has_mark(self) -> bool
pub const fn has_mark(self) -> bool
Whether a byte-order mark is written, and expected on read.
The mark is a code unit like any other and its octets are
counted in the length: omniORB writes 0a000000 fffe 6100 34d8 1edd 6200 for "a𝄞b", ten octets over five units.
§7.4.1.1.2 forbids it outright — “shall not include a Byte Order
Mark” — so no DDS dialect selects it.
Sourcepub const fn writes_little_endian_units(self, _position: WirePosition) -> bool
pub const fn writes_little_endian_units(self, _position: WirePosition) -> bool
Whether one code unit goes out little-endian whatever the stream’s order is.
Takes the position for the reason WstringLengthPolicy’s
accessors do. Measured to agree at the member and the collection
element in all nine implementations.