Expand description
A re-export of minicbor.
Modules§
- bytes
- Newtypes for
&[u8],[u8;N]andVec<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
Writesink.
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.
- From
Cbor - 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::encodemakes room for encoding into any Writer type, and thus provides the ability to fail.
Functions§
- decode
- Decode a type implementing
Decodefrom the given byte slice. - decode_
with - Decode a type implementing
Decodefrom the given byte slice. - display
- Display the given CBOR bytes in diagnostic notation.
- encode
- Encode a type implementing
Encodeto the givenencode::Writeimpl. - encode_
with - Encode a type implementing
Encodeto the givenencode::Writeimpl. - 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
Encodeand return the encoded byte vector. - to_
vec_ with - Encode a type implementing
Encodeand return the encoded byte vector.