pub struct FieldSpec {
pub name: String,
pub required: bool,
pub shape: Option<Shape>,
pub link_prefix: Option<PathBuf>,
pub default: Option<Value>,
pub enum_values: Option<Vec<String>>,
pub unknown_modifiers: Vec<String>,
}Expand description
One field declaration inside a Schema: - <name> (<modifiers>).
Modifiers are comma-separated inside the parens; this captures the
recognized ones as typed fields and stashes anything unrecognized in
unknown_modifiers (surfaced as Info).
Fields§
§name: StringThe field name.
required: boolrequired modifier present.
shape: Option<Shape>The shape modifier (string/int/bool/date/email/currency/
url), if any.
link_prefix: Option<PathBuf>link to <prefix>/ — the store-relative prefix a wiki-link target must
start with. The trailing slash is required in the source syntax.
default: Option<Value>default <value> — the value written when the field is absent.
enum_values: Option<Vec<String>>enum: <v1>, <v2>, ... — the allowed values (must be the last modifier
on the line because of its own commas).
unknown_modifiers: Vec<String>Any modifiers not in the recognized vocabulary, preserved verbatim;
validate surfaces these as Info, never errors.