Skip to main content

decode

Function decode 

Source
pub fn decode(
    bytes: &[u8],
    limits: &DecodeLimits,
) -> Result<Module<Unverified>, DecodeError>
Expand description

Strictly decodes untrusted bytes. Every length is checked before allocation; semantic validity remains represented by the Unverified typestate.

ยงErrors

Returns the first malformed, noncanonical, or over-limit byte encountered, or trailing bytes after a complete module.