This is a Rust library for validating data structures against a CDDL document.

Note: This library is fairly new, and may still contain significant bugs, ommissions, or unstable interfaces.

The goal of this library is to make individual encodings (like CBOR or JSON) easy to validate.

Some of the ways this library differs from other implementations:

An example, validating CBOR-encoded data against a CDDL schema: ```rust use cddlcat::validatecbor_bytes; use serde::Serialize;

[derive(Serialize)]

struct PersonStruct { name: String, age: u32, }

let input = PersonStruct { name: "Bob".tostring(), age: 43, }; let cborbytes = serdecbor::tovec(&input).unwrap(); let cddlinput = "thing = {name: tstr, age: int}"; validatecborbytes("thing", cddlinput, &cbor_bytes).unwrap(); ```