Skip to main content

Module spec

Module spec 

Source
Expand description

A spec by example: the value a spec is written as, before it is compiled into a node. Rust has no untyped literal, so a spec is built from these conversions, from the builders, or from the shape! macro.

Enums§

Spec
A spec by example.

Functions§

arr
An array spec: arr([Token::String.into()]) is an array of strings, more than one item a tuple, none an array of anything.
from_map
A literal object value as a spec, its properties the defaults.
null
The literal null spec.
obj
An object spec from pairs, in order: obj([("a", 1.into()), ("b", Token::String.into())]).