Expand description
What is established about one GFF field, and the vocabulary for saying it.
The shape follows what a field is, rather than growing a slot per defect as each is found.
§Nine facts
Two are about the file: the label and, inside Shape, the GFF type.
Five are about the engine: Life, Absent, required,
Constraint and Omission. Two are about this crate: the
Substitute its reader produces where the engine’s answer names no
value, and modelled, whether this layer holds a member for the label at
all.
§What is deliberately not here
Provenance. A citation beside an entry enforces nothing: it catches an
empty string and never a false one. Life::Unexamined is the structural
answer to a field nobody has looked at. Provenance itself lives on the
pages under docs/src/formats/, keyed by the same labels these entries
declare.
The Rust type. A field’s type decides how to read it, how to write it
and which GFF type it maps to. Recording that mapping makes a closed table
somebody has to maintain, which this layer has already grown twice. Types
state their own mapping through GffScalar instead.
Structs§
- Field
- One field of one GFF struct, and everything established about it.
- Field
Route - Where a field sits, from the root of the view that declares it.
- Omission
- The engine’s own writer leaves this label out at some value.
- Produced
- A value produced on demand, because a
constcannot hold aString. - Split
- A list whose elements carry extra fields chosen by a sibling of the list.
Enums§
- Absent
- What the engine does when the label is missing.
- Constraint
- A range the engine clamps a read value into.
- Element
Id - The struct id the engine’s own writer puts on a list’s elements.
- GffType
- The GFF wire types a scalar can be.
- Life
- Whether the engine reads a label at a path, and if not, why saying so helps.
- Omit
When - The equality test an omission is decided by.
- Resolution
- How the engine’s value for a missing label arises.
- Route
Error - Why a route could not be used.
- Route
Parse Error - Why a rendered route would not parse back.
- Route
Step - One step of a
FieldRoute. - Shape
- What a field holds.
- Silence
- Why the engine’s answer names no value.
- Substitute
- What this crate’s reader hands back where the engine’s answer names no value.
- Taken
- What this crate’s reader does with a value the engine resolves.
Traits§
- FromGff
- Reads a typed view out of a parsed container.
- GffScalar
- How one Rust type maps onto a GFF value.
- HasSchema
- Associates a schema with the type it describes.
Functions§
- gff_
value_ type - The GFF wire types a scalar can be.
- routes_
in - Every route a view declares, with the field each one names.
- routes_
under - Every route under an explicit set of schema parts.