pub enum ObjectVariant {
ByReference(String),
ByXmlString(String),
InBinary(Vec<u8>),
}Expand description
ObjectVariant-Wire-Repraesentation.
Variants§
ByReference(String)
Reference-by-Name-String.
ByXmlString(String)
Inline-XML-Repraesentation.
InBinary(Vec<u8>)
Inline-Binary (XCDR2-encoded strong-type).
Implementations§
Source§impl ObjectVariant
impl ObjectVariant
Sourcepub fn discriminator(&self) -> u8
pub fn discriminator(&self) -> u8
Discriminator-Byte.
Sourcepub fn encode(&self, e: Endianness) -> Result<Vec<u8>, XrceError>
pub fn encode(&self, e: Endianness) -> Result<Vec<u8>, XrceError>
Encodiert diese Variante in XCDR2-Form mit gegebener Endianness. Layout:
+----+----+----+----+----+ ... +----+
|disc| pad pad pad | payload |
+----+----+----+----+----+ ... +----+disc (1 Byte) + 3 Padding-Bytes (XCDR2-Alignment auf 4); danach
die Length (u32) + Bytes der Variante.
§Errors
PayloadTooLarge, wenn die Payload > REPR_MAX_INLINE_BYTES.
Trait Implementations§
Source§impl Clone for ObjectVariant
impl Clone for ObjectVariant
Source§fn clone(&self) -> ObjectVariant
fn clone(&self) -> ObjectVariant
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObjectVariant
impl Debug for ObjectVariant
Source§impl PartialEq for ObjectVariant
impl PartialEq for ObjectVariant
Source§fn eq(&self, other: &ObjectVariant) -> bool
fn eq(&self, other: &ObjectVariant) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ObjectVariant
impl StructuralPartialEq for ObjectVariant
Auto Trait Implementations§
impl Freeze for ObjectVariant
impl RefUnwindSafe for ObjectVariant
impl Send for ObjectVariant
impl Sync for ObjectVariant
impl Unpin for ObjectVariant
impl UnsafeUnpin for ObjectVariant
impl UnwindSafe for ObjectVariant
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