[][src]Module cddl_cat::ivt

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

Array

An array is a list of types in a specific order.

Choice

A Choice validates if any one of a set of options validates.

Group

A context-free group of key-value pairs.

KeyValue

A key-value pair; key and value can be anything (types, arrays, maps, etc.)

Map

A map containing key-value pairs.

Occur

Occurences specify how many times a value can appear.

Range

A range of numbers.

Rule

A rule reference, linked to a dispatch object for later resolution.

RuleDef

The definition of a CDDL rule.

Enums

Literal

A literal value, e.g. 7, 1.3, or "foo".

Node

Any node in the Intermediate Validation Tree.

PreludeType

One of the types named in the CDDL prelude.

Functions

literal_bool

A shortcut for Node::Literal(Literal::Bool(b))

literal_bytes

A shortcut for Node::Literal(Literal::Bytes(b))

literal_float

A shortcut for Node::Literal(Literal::Float(f))

literal_int

A shortcut for Node::Literal(Literal::Int(i))

literal_text

A shortcut for Node::Literal(Literal::Text(t))

Type Definitions

OccurLimit

Specify a CDDL occurrence's limits.

RulesByName

A set of CDDL rules.

RulesWithStrings

A set of CDDL rules.