pub fn canonicalize(raw: &[u8]) -> Result<Vec<u8>, ShapeViolation>Expand description
Re-encode raw (any well-formed CBOR item) into its RFC 8949 §4.2
deterministic-encoding canonical form.
§Errors
[ShapeViolation] if raw is not exactly one well-formed CBOR data
item, contains a reserved/invalid head, a non-UTF-8 text string, a
map with duplicate keys, or nests deeper than MAX_CBOR_DEPTH.