Crate cbor_diag

source ·
Expand description

A crate for parsing data encoded in Concise Binary Object Representation (CBOR) (in any of raw binary, hex encoded (with comments) or diagnostic notation) then printing it out in either annotated hex form or diagnostic notation. While doing so as much of the structured data as possible is retained to improve the debugging experience. The primary intention of this crate is to be used in diagnostic tools working with CBOR data.

Structs

  • A string of raw bytes with no direct attached meaning.
  • A “simple value” data item.
  • A semantic tag for a CBOR data item.
  • A UTF-8 encoded text string.

Enums

  • A CBOR data item.
  • How many additional bytes are used to encode this float (in bits).
  • How many additional bytes are used to encode this integer (in bits).

Functions

  • Parse a string containing a binary encoded CBOR data item.
  • Parse a string containing a binary encoded CBOR data item, optionally followed by more data.
  • Parse a string containing a diagnostic notation encoded CBOR data item.
  • Parse a string containing a hex encoded CBOR data item.

Type Definitions