pub struct RuleSet { /* private fields */ }Expand description
A rule set, as described by the manifest of its bundle: its name and version, the XML schema to validate against first, and the stylesheets to run, in order, with their checksums.
Implementations§
Source§impl RuleSet
impl RuleSet
Sourcepub fn parse(manifest: &str) -> Result<Self, Error>
pub fn parse(manifest: &str) -> Result<Self, Error>
Parses a bundle manifest (see the crate documentation for the format).
§Errors
Error::Bundle naming the line: a syntax outside the accepted TOML subset, an
unknown or repeated key, a missing key, a value that is not valid for its key, an
unknown schema, a format other than MANIFEST_FORMAT.
Sourcepub fn builtin(name: &str) -> Result<Self, Error>
pub fn builtin(name: &str) -> Result<Self, Error>
The manifest of the built-in rule set name (see
BUILTIN_RULE_SETS), without loading it.
§Errors
Error::Bundle for an unknown name.
Sourcepub const fn schema(&self) -> Option<SchemaId>
pub const fn schema(&self) -> Option<SchemaId>
The XML schema documents are validated against first, if any.
Sourcepub fn stylesheets(&self) -> &[StylesheetEntry]
pub fn stylesheets(&self) -> &[StylesheetEntry]
The stylesheets, in the order they run.
Trait Implementations§
impl Eq for RuleSet
impl StructuralPartialEq for RuleSet
Auto Trait Implementations§
impl Forget for RuleSet
impl Freeze for RuleSet
impl RefUnwindSafe for RuleSet
impl Send for RuleSet
impl Sync for RuleSet
impl Unpin for RuleSet
impl UnsafeUnpin for RuleSet
impl UnwindSafe for RuleSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more