Skip to main content

decode_payload

Function decode_payload 

Source
pub fn decode_payload<T: DeserializeOwned + Serialize + Validate>(
    payload: &RawValue,
    options: &DecodeOptions,
) -> Result<T, DecodeError>
Expand description

Decodes and validates one payload according to options.

Used by the generated CsRequest::decode / CsmsRequest::decode dispatchers, and usable directly when the action is known statically. decode_payload_reporting is the same, and also says what leniency forgave.