barrel_design_cbor (barrel_design v0.1.0)
View SourceStrict decoder for the CBOR a guest emits.
Accepts unsigned and negative integers that fit 64 bits, UTF-8 texts, definite-length arrays, false, true and null, nested at most 4 deep, and requires the input to hold exactly one value. Byte strings, maps, floats, tags and indefinite lengths are refused: an emitted key or value must mean the same thing on every node.
Summary
Functions
-spec decode(binary()) -> {ok, barrel_design_key:key()} | {error, invalid_cbor}.