Skip to main content

decode_wrapped_body

Function decode_wrapped_body 

Source
pub(crate) fn decode_wrapped_body<T: DeserializeOwned>(
    body: &[u8],
) -> Result<T, ServerError>
Expand description

Decode a POST body from OrchestratorClient.

client.rs builds these bodies by calling body_binary on an already vbs-serialized Vec<u8>, so the wire body is [4-byte version][8-byte bincode Vec length][inner vbs-serialized payload]; the first 12 bytes are an artifact of that double encoding and must be stripped before decoding the inner payload.