pub enum ValidationError {
UnknownField {
path: String,
line: Option<usize>,
suggestion: Option<String>,
},
UnknownRule {
name: String,
line: Option<usize>,
suggestion: Option<String>,
},
UnknownRuleOption {
rule: String,
option: String,
line: Option<usize>,
suggestion: Option<String>,
},
}Expand description
Validation error for configuration files.
Returned by LintConfig::validate_file when the TOML file contains
unrecognised keys or rule names. Each variant includes an optional
suggestion produced by fuzzy matching.
Variants§
UnknownField
An unrecognised top-level or section-level field (e.g. [colour] instead of [color]).
Fields
UnknownRule
A [rules.<name>] section where <name> is not a known rule.
Fields
UnknownRuleOption
An unrecognised option inside a rule section (e.g. indent_sizee in [rules.indent]).
Trait Implementations§
Source§impl Clone for ValidationError
impl Clone for ValidationError
Source§fn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationError
impl Debug for ValidationError
Auto Trait Implementations§
impl Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnwindSafe for ValidationError
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