Skip to main content

encode_from_cdr

Function encode_from_cdr 

Source
pub fn encode_from_cdr<S: SchemaSink + ?Sized>(
    reader: &mut CdrReader<'_>,
    type_name: &str,
    schema: &'static [Field],
    sink: &mut S,
) -> Result<(), SchemaError>
Expand description

Walk schema, reading CDR and pushing each value into sink.

reader must be positioned at the start of the struct’s members (past the encapsulation header). The DHEADER handling mirrors a generated serialize exactly: one per struct, top-level AND nested, a no-op under XCDR1 — the same rule crate::size was written against.