pub enum Mode {
Reply,
Decode,
Relaxed,
Input,
Rebuild,
}Expand description
What is being decoded, which decides what a field the type does not
declare means and which types decoding may build (Mode::settings).
Variants§
Reply
A Tool reply: an undeclared field is ignored.
Decode
The text json.decode reads: an undeclared field is ignored, and a
host value is refused, as in a run’s input.
Relaxed
json.decode with json.Names.Relaxed: as Mode::Decode, and
each record field and enum constructor the type declares is matched
by its relaxed key (Spelling::Relaxed).
Input
A run’s input: an undeclared field is refused, and so is a host value, since input is data.
Rebuild
A value the program made, read back from its canonical text, such as
a checkpoint’s arguments on resume. This is not decoding (abi.md,
Decoding): every type is rebuilt, opaque types and host tokens
included, and a type with a part that has no encoding, such as a
list of functions, whose text holds no value there. An undeclared
field is refused, since the text is canonical.