Skip to main content

decode

Function decode 

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

Decode a single deterministic-CBOR value from bytes. The whole buffer must be consumed by exactly one top-level value — trailing bytes are an error, matching the reference decoder’s own contract.