Module cbor

Module cbor 

Source
Expand description

A re-export of minicbor.

Modules§

bytes
Newtypes for &[u8], [u8;N] and Vec<u8>.
data
CBOR data types, tokens and tags.
decode
Traits and types for decoding CBOR.
encode
Traits and types for encoding CBOR.

Structs§

Decoder
A non-allocating CBOR decoder.
Encoder
A non-allocating CBOR encoder writing encoded bytes to the given Write sink.

Traits§

CborLen
A type that can calculate its own CBOR encoding length.
Decode
A type that can be decoded from CBOR.
Encode
A type that can be encoded to CBOR.
FromCbor
A trait mostly for convenience, as we often end up writing bytes to CBOR.
ToCbor
A trait mostly for convenience, as we often end up writing bytes to CBOR. The original minicbor::Encode::encode makes room for encoding into any Writer type, and thus provides the ability to fail.

Functions§

decode
Decode a type implementing Decode from the given byte slice.
decode_with
Decode a type implementing Decode from the given byte slice.
display
Display the given CBOR bytes in diagnostic notation.
encode
Encode a type implementing Encode to the given encode::Write impl.
encode_with
Encode a type implementing Encode to the given encode::Write impl.
len
Calculate the length in bytes of the given value’s CBOR representation.
len_with
Calculate the length in bytes of the given value’s CBOR representation.
to_vec
Encode a type implementing Encode and return the encoded byte vector.
to_vec_with
Encode a type implementing Encode and return the encoded byte vector.

Derive Macros§

CborLen
Derive the minicbor::CborLen trait for a struct or enum.
Decode
Derive the minicbor::Decode trait for a struct or enum.
Encode
Derive the minicbor::Encode trait for a struct or enum.