Skip to main content

requires

Function requires 

Source
pub fn requires(specs: Vec<TextMatchSpec>) -> Box<dyn Rule>
Expand description

Require each listed phrase to be PRESENT in the bound section’s subtree text — a node-local Rule for a section’s rules slot. Each entry emits its own text/requires finding at the section heading when its phrase is absent (or text/count when a min / max bound is violated).

§Panics

On an absence-form entry (max: 0 or max < min; use forbids), an entry with no needle, or a regex the regex crate rejects.