pub enum EncodingVersion {
Xcdr1,
Xcdr2,
}Expand description
CDR writer for serialization.
Handles alignment and endianness for ROS 2 CDR encoding.
Alignment is computed relative to origin — when a 4-byte CDR
header is present, origin = 4 so that fields align correctly
within the payload portion of the buffer.
CDR encoding version. XCDR1 is the historical default (PLAIN_CDR, no
DHEADER, 8-byte primitives align to 8). XCDR2 (phase-303 W2 / RFC-0055 /
#0267) is DELIMITED_CDR for APPENDABLE types: every struct is wrapped in a
4-byte DHEADER and 8-byte primitives align to 4.
Variants§
Xcdr1
PLAIN_CDR (encapsulation 0x0001). The default; byte-identical to every
pre-W2 stream.
Xcdr2
DELIMITED_CDR2 (encapsulation 0x0009) — appendable + DHEADER.
Trait Implementations§
Source§impl Clone for EncodingVersion
impl Clone for EncodingVersion
Source§fn clone(&self) -> EncodingVersion
fn clone(&self) -> EncodingVersion
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 moreimpl Copy for EncodingVersion
Source§impl Debug for EncodingVersion
impl Debug for EncodingVersion
Source§impl Default for EncodingVersion
impl Default for EncodingVersion
Source§fn default() -> EncodingVersion
fn default() -> EncodingVersion
Returns the “default value” for a type. Read more
impl Eq for EncodingVersion
Source§impl PartialEq for EncodingVersion
impl PartialEq for EncodingVersion
Source§fn eq(&self, other: &EncodingVersion) -> bool
fn eq(&self, other: &EncodingVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EncodingVersion
Auto Trait Implementations§
impl Freeze for EncodingVersion
impl RefUnwindSafe for EncodingVersion
impl Send for EncodingVersion
impl Sync for EncodingVersion
impl Unpin for EncodingVersion
impl UnsafeUnpin for EncodingVersion
impl UnwindSafe for EncodingVersion
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