oa_gateway_agra

Function unwrapped_from_parts

Source
pub fn unwrapped_from_parts(
    topic: &str,
    meta: WrapperMeta,
    encoded: Bytes,
) -> Result<Unwrapped, AgraError>
Expand description

Builds wrapper and inner envelopes from structured Rx/Tx fields.

The DDS adapter’s wire type is these fields plus raw EncodedPayload bytes, not XML or JSON text. The wrapper envelope is a minimal JSON document so wrapper_kind and unwrap still recognize it.

§Errors

Returns AgraError::PayloadTooLarge if encoded is over MAX_DECODED_PAYLOAD, or AgraError::Json if the wrapper document cannot be serialized.