Skip to main content

decode_payload

Function decode_payload 

Source
pub fn decode_payload<T>(payload: &Payload) -> Result<T, WorkerError>
Expand description

Decodes a payload into a typed value using the payload content-type tag.

ยงErrors

Returns WorkerError::Decode when the payload tag or bytes cannot produce the requested type.