pub struct WString(pub String);Expand description
IDL wstring wrapper. Holds the text as a Rust String (Unicode), but the
wire format differs from string: GIOP 1.2 encodes a wstring as a
uint32 length in octets (NOT characters, NOT incl. terminator)
followed by the UTF-16 code units in the message byte order — without a
null terminator. This makes wstring distinct from string (UTF-8) and
interop-capable with ORBs whose transmission codeset is UTF-16 (the default
for omniORB/TAO/JacORB).
Tuple Fields§
§0: StringImplementations§
Trait Implementations§
Source§impl CdrDecode for WString
impl CdrDecode for WString
Source§fn decode(reader: &mut BufferReader<'_>) -> Result<Self, DecodeError>
fn decode(reader: &mut BufferReader<'_>) -> Result<Self, DecodeError>
Reads this value from the reader (alignment-aware). Read more
Source§const IS_PRIMITIVE: bool = false
const IS_PRIMITIVE: bool = false
XCDR2 primitive classification, symmetric to
CdrEncode::IS_PRIMITIVE. Controls DHEADER reading when
decoding sequence<T>/T[N] with non-primitive T.Source§impl CdrEncode for WString
impl CdrEncode for WString
Source§fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>
fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>
Writes this value into the writer (alignment-aware). Read more
Source§const IS_PRIMITIVE: bool = false
const IS_PRIMITIVE: bool = false
XCDR2 primitive classification (OMG XTypes 1.3 §7.4.3.5):
true
only for primitives (bool, octet, int8/16/32/64, uint8/16/32/64,
float, double, char/wchar). false for aggregate/variable
types (string, struct, union, enum, sequence, array, map).
Controls DHEADER prepending for sequence<T>/T[N]:
collections with NON-primitive elements need a DHEADER (uint32 =
byte length of the following content) under XCDR2.impl Eq for WString
Source§impl Ord for WString
impl Ord for WString
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for WString
impl PartialOrd for WString
impl StructuralPartialEq for WString
Auto Trait Implementations§
impl Freeze for WString
impl RefUnwindSafe for WString
impl Send for WString
impl Sync for WString
impl Unpin for WString
impl UnsafeUnpin for WString
impl UnwindSafe for WString
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more