Skip to main content

decode_dynamic

Function decode_dynamic 

Source
pub fn decode_dynamic(
    ty: &DynamicType,
    bytes: &[u8],
    xcdr2: bool,
    big_endian: bool,
) -> Result<DynamicData, CodecError>
Expand description

Decode bytes (a CDR payload WITHOUT the encapsulation header) into a DynamicData of ty. xcdr2 selects XCDR2 vs XCDR1 framing; big_endian the byte order — both come from the sample’s encapsulation id on the wire.

§Errors

CodecError on a wire failure, a DynamicData failure, or an unsupported construct.