Skip to main content

decode_incoming_value

Function decode_incoming_value 

Source
pub fn decode_incoming_value(
    value: Value,
) -> Result<IncomingRequest, DebugProtocolError>
Expand description

Decode an incoming request from a JSON value that the transport already parsed.

Server loops need the request id even when the typed payload is malformed. Keeping the parsed value lets them recover that id and then consume the same allocation for typed decoding instead of parsing the complete frame twice.