Crate sk_cbor

Source

Re-exports§

pub use self::reader::read;
pub use self::values::SimpleValue;
pub use self::values::Value;
pub use self::writer::write;

Modules§

macros
Convenience macros for working with CBOR values.
reader
Functionality for deserializing CBOR data into values.
values
Types for expressing CBOR values.
writer
Functionality for serializing CBOR values into bytes.

Macros§

assert_sorted_keys
Assert that the keys in a vector of key-value pairs are in canonical order.
cbor_array
Creates a CBOR Value of type Array with the given elements.
cbor_array_vec
Creates a CBOR Value of type Array from a Vec.
cbor_bool
Creates a CBOR Value of type Simple with the given bool value.
cbor_bytes
Creates a CBOR Value of type Byte String with the given slice or vector.
cbor_bytes_lit
Creates a CBOR Value of type Byte String with the given byte string literal.
cbor_false
Creates a CBOR Value of type Simple with value false.
cbor_int
Creates a CBOR Value of type Unsigned or Negative with the given numeric value.
cbor_map
Creates a CBOR Value of type Map with the specified key-value pairs.
cbor_map_collection
Creates a CBOR Value of type Map from a Vec<(Value, Value)>.
cbor_map_options
Creates a CBOR Value of type Map with key-value pairs where values can be Options.
cbor_null
Creates a CBOR Value of type Simple with value null.
cbor_tagged
Creates a CBOR Value of type Tag with the given tag and object.
cbor_text
Creates a CBOR Value of type Text String with the given string.
cbor_true
Creates a CBOR Value of type Simple with value true.
cbor_undefined
Creates a CBOR Value of type Simple with the undefined value.
cbor_unsigned
Creates a CBOR Value of type Unsigned with the given numeric value.
destructure_cbor_map
This macro generates code to extract multiple values from a Vec<(Value, Value)> at once in an optimized manner, consuming the input vector.