#[non_exhaustive]pub struct Origin {
pub document: PathBuf,
pub at: String,
}Expand description
Which document a rule was read from, and where in it — what makes
precedence visible. A schema composed from several documents decides
which rule wins a path by include order, and a person asking “why did this
rule govern, and what did it shadow” needs each rule to say where it came
from. fig-schema explain prints one per matching rule.
None on a FieldRule built in Rust; set by
load_schema on every rule it reads.
#[non_exhaustive]: an origin gains detail (a line, once fig exposes one)
the same way an Issue does. Built with Origin::new.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.document: PathBufThe document, as the loader was given it or resolved it — so an included document is named relative to the one that included it.
at: StringWhere in that document, as a fig path: rules[2] for the third entry
of a schema document’s rules, vocabulary for the one rule a
vocabulary document declares.