Skip to main content

Module ty

Module ty 

Source
Expand description

The type a setting was declared with, and reading a raw string as it.

A trimmed-down runtime form of the spec’s type grammar: enough to coerce and validate, with none of the parsing. The derive turns a Vec<String> field into Ty::List(&Ty::String) at compile time, so the shape a value must take costs a match rather than a parse.

Every layer that reads text — the environment, an .npmrc, a git config — hands over a string, and the declared type is the only thing that says whether "1" is the number one, the string “1”, or a one-element list.

Structs§

TypeError
Why a value could not be read as the type its setting declares.

Enums§

Parser
A named way of splitting one string into several values.
Ty
A declared type, as a generated registry holds it.