pub struct EncapsulationId {
pub format: XcdrFormat,
pub order: ByteOrder,
}Expand description
The encapsulation identifier at the start of a payload: a format and a byte order (DDS-XTypes Table 60, Table 39; DDSI-RTPS 2.5 Table 10.3).
Fields§
§format: XcdrFormatThe format of the top-level object.
order: ByteOrderThe byte order of the payload.
Implementations§
Source§impl EncapsulationId
impl EncapsulationId
Sourcepub fn to_bytes(self) -> [u8; 2]
pub fn to_bytes(self) -> [u8; 2]
The two octets of the identifier.
The encoding version 2 values are those of DDS-XTypes Table 60,
the RTPS encapsulation identifiers (0x06 to 0x0b). DDS-XTypes
Table 39 and DDSI-RTPS 2.5 Table 10.3 list other values (0x10 to
0x15) for the same formats; they are accepted by
from_bytes but never written, as
DDS implementations in use (Cyclone DDS 0.10 among them) drop
payloads that carry them.
Sourcepub fn from_bytes(bytes: [u8; 2]) -> Result<EncapsulationId>
pub fn from_bytes(bytes: [u8; 2]) -> Result<EncapsulationId>
Reads the two octets of an identifier. XML (0x0004) and unknown
identifiers are errors.
Trait Implementations§
Source§impl Clone for EncapsulationId
impl Clone for EncapsulationId
impl Copy for EncapsulationId
Source§impl Debug for EncapsulationId
impl Debug for EncapsulationId
impl Eq for EncapsulationId
Source§impl Hash for EncapsulationId
impl Hash for EncapsulationId
Source§impl PartialEq for EncapsulationId
impl PartialEq for EncapsulationId
impl StructuralPartialEq for EncapsulationId
Auto Trait Implementations§
impl Forget for EncapsulationId
impl Freeze for EncapsulationId
impl Move for EncapsulationId
impl RefUnwindSafe for EncapsulationId
impl Send for EncapsulationId
impl Sync for EncapsulationId
impl Unpin for EncapsulationId
impl UnsafeUnpin for EncapsulationId
impl UnwindSafe for EncapsulationId
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