Module cddl_cat::ivt

source ·
Expand description

This module defines the Intermediate Validation Tree.

It contains a simplified representation of a CDDL rule, flattened to only include the parts that are necessary for validation.

This module doesn’t know anything about validating specific types (e.g. CBOR or JSON), but it helps make writing those validators easier.

Structs

  • An array is a list of types in a specific order.
  • A Choice validates if any one of a set of options validates.
  • Control Operator .cbor
  • Control Operator .regexp
  • Control Operator .size
  • A context-free group of key-value pairs.
  • A key-value pair; key and value can be anything (types, arrays, maps, etc.)
  • A map containing key-value pairs.
  • Occurences specify how many times a value can appear.
  • A range of numbers.
  • A rule reference, linked to a dispatch object for later resolution.
  • The definition of a CDDL rule.

Enums

  • Control Operators
  • A literal value, e.g. 7, 1.3, or "foo".
  • Any node in the Intermediate Validation Tree.
  • One of the types named in the CDDL prelude.

Functions

Type Aliases