Skip to main content

decode_owned_limit

Function decode_owned_limit 

Source
pub fn decode_owned_limit(data: Vec<u8>, max_len: usize) -> Result<Vec<u8>>
Expand description

Decodes an owned envelope, rejecting any payload whose decoded size exceeds max_len bytes.

ยงErrors

Returns Error::OutputLimit when the decoded payload exceeds max_len, or the same errors as decode.