Expand description

Convenience macros for working with CBOR values.

Macros

Assert that the keys in a vector of key-value pairs are in canonical order.

Creates a CBOR Value of type Array with the given elements.

Creates a CBOR Value of type Array from a Vec.

Creates a CBOR Value of type Simple with the given bool value.

Creates a CBOR Value of type Byte String with the given slice or vector.

Creates a CBOR Value of type Byte String with the given byte string literal.

Creates a CBOR Value of type Simple with value false.

Creates a CBOR Value of type Unsigned or Negative with the given numeric value.

Creates a CBOR Value of type Map with the specified key-value pairs.

Creates a CBOR Value of type Map from a Vec<(Value, Value)>.

Creates a CBOR Value of type Map with key-value pairs where values can be Options.

Creates a CBOR Value of type Simple with value null.

Creates a CBOR Value of type Tag with the given tag and object.

Creates a CBOR Value of type Text String with the given string.

Creates a CBOR Value of type Simple with value true.

Creates a CBOR Value of type Simple with the undefined value.

Creates a CBOR Value of type Unsigned with the given numeric value.

This macro generates code to extract multiple values from a Vec<(Value, Value)> at once in an optimized manner, consuming the input vector.

Functions

This function is an internal detail of the destructure_cbor_map! macro, but has public visibility so that users of the macro can use it.