cbor_diag/lib.rs
1//! A crate for parsing data encoded in [Concise Binary Object Representation
2//! (CBOR)](https://cbor.io) (in any of raw binary, hex encoded (with comments)
3//! or [diagnostic notation][]) then printing it out in either annotated hex
4//! form or diagnostic notation. While doing so as much of the structured data
5//! as possible is retained to improve the debugging experience. The primary
6//! intention of this crate is to be used in diagnostic tools working with CBOR
7//! data.
8//!
9//! [diagnostic notation]: https://tools.ietf.org/html/rfc7049#section-6
10
11#![warn(rust_2018_idioms)]
12
13mod encode;
14mod error;
15mod parse;
16mod syntax;
17
18pub use self::{
19 error::{Error, Result},
20 parse::{parse_bytes, parse_bytes_partial, parse_diag, parse_hex},
21 syntax::{ByteString, DataItem, FloatWidth, IntegerWidth, Simple, Tag, TextString},
22};