Skip to main content

transcode_request

Function transcode_request 

Source
pub fn transcode_request(
    action: Action,
    payload: &RawValue,
    options: &DecodeOptions,
) -> Result<Box<RawValue>, DecodeError>
Expand description

Decodes a request payload into its typed form and serializes it back.

The round trip is the strongest cheap check that the generated types cover a payload completely: anything the types do not model is missing from the output. It backs ocpp-cli validate and the schema conformance suite.