pub struct ValidationOptions<'a> {
pub parents: Vec<&'a Node<'a>>,
pub validate_functions: bool,
pub environment: Option<String>,
}Expand description
Switches and context for one validation pass.
Mirrors upstream’s config.validation. It is part of the config rather than
a separate argument because schema validate hooks read it – most usefully
parents, which is how a schema says “a
heading is not allowed inside a callout” without walking the tree itself.
Fields§
§parents: Vec<&'a Node<'a>>The ancestors of the node being validated, outermost first.
Set by validate_tree as it walks, and
empty for the document node. A hook reading this is reading the path it
was reached by, not the whole tree.
validate_functions: boolWhether function calls in attributes are checked against
Config::functions.
Off by default, as upstream has it: a document may legitimately use functions a validating tool does not know about.
environment: Option<String>A host-defined label for the environment being validated.
This crate never reads it. It exists because upstream schemas do, and dropping it would break a ported schema for no gain.
Trait Implementations§
Source§impl<'a> Clone for ValidationOptions<'a>
impl<'a> Clone for ValidationOptions<'a>
Source§fn clone(&self) -> ValidationOptions<'a>
fn clone(&self) -> ValidationOptions<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more