Skip to main content

CdrEncode

Trait CdrEncode 

Source
pub trait CdrEncode {
    const IS_PRIMITIVE: bool = false;

    // Required method
    fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>;
}
Expand description

Value can be encoded into a BufferWriter.

Provided Associated Constants§

Source

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.

Required Methods§

Source

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Writes this value into the writer (alignment-aware).

§Errors

EncodeError.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CdrEncode for String

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for bool

Available on crate feature alloc only.
Source§

const IS_PRIMITIVE: bool = true

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for char

Available on crate feature alloc only.
Source§

const IS_PRIMITIVE: bool = true

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for f32

Available on crate feature alloc only.
Source§

const IS_PRIMITIVE: bool = true

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for f64

Available on crate feature alloc only.
Source§

const IS_PRIMITIVE: bool = true

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for i8

Available on crate feature alloc only.
Source§

const IS_PRIMITIVE: bool = true

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for i16

Available on crate feature alloc only.
Source§

const IS_PRIMITIVE: bool = true

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for i32

Available on crate feature alloc only.
Source§

const IS_PRIMITIVE: bool = true

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for i64

Available on crate feature alloc only.
Source§

const IS_PRIMITIVE: bool = true

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for str

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for u8

Available on crate feature alloc only.
Source§

const IS_PRIMITIVE: bool = true

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for u16

Available on crate feature alloc only.
Source§

const IS_PRIMITIVE: bool = true

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for u32

Available on crate feature alloc only.
Source§

const IS_PRIMITIVE: bool = true

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl CdrEncode for u64

Available on crate feature alloc only.
Source§

const IS_PRIMITIVE: bool = true

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl<K, V> CdrEncode for BTreeMap<K, V>
where K: CdrEncode + Ord, V: CdrEncode,

Source§

impl<T: CdrEncode, const N: usize> CdrEncode for [T; N]

Source§

const IS_PRIMITIVE: bool = T::IS_PRIMITIVE

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl<T: CdrEncode> CdrEncode for Option<T>

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Source§

impl<T: CdrEncode> CdrEncode for Vec<T>

Source§

fn encode(&self, writer: &mut BufferWriter) -> Result<(), EncodeError>

Implementors§

Source§

impl CdrEncode for CorbaAny

Source§

impl CdrEncode for WChar

Source§

impl CdrEncode for WString

Source§

impl<const P: u32, const S: u32> CdrEncode for Fixed<P, S>