Expand description
Module implement simple and easy CBOR serialization.
Why use custom cbor implementation while there are off-the-self solutions ?
Because CBOR specification itself is open-ended, and custom implementation means, we can mold it to the needs of distributed apps. This implementation is also tuned for big-data and document databases.
Use cbordata-derive
package for procedural-macro Cborize
, can be used on
any struct or enum to implement IntoCbor
and FromCbor
trait for the derived
struct or enum. Note that Cborize
expects an associated constant ID
. Refer
to get_cborize_id for details.
Features
Macros
Short form to compose Error values.
Enums
Cbor type enumerated over its major variants.
Error variants that can be returned by this package’s API.
Possible types that can be used as a key in cbor-map.
Major type 7, simple-value. Refer to Cbor spec for details.
Constants
Recursion limit for nested Cbor objects.
Traits
Convert from Cbor, the cbor value is typically obtained by decoding it from bytes.
Functions
Get unique ID associated with user-defined type.
Return pretty formated string representing val
.
Type Definitions
Result type, for jsondata functions and methods, that require a success or failure variant.