#[non_exhaustive]pub enum Rule {
Syntax,
DuplicateKey,
InvalidNumber,
InvalidCodePoint,
ByteOrderMark,
MissingFinalNewline,
}Expand description
What jsonvet checks. Every problem belongs to one rule.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Syntax
The first syntax error. Checking stops there, and its severity is always error.
DuplicateKey
A key repeated in the same object.
InvalidNumber
A number outside a double’s range, or an integer past ±(2⁵³ − 1).
InvalidCodePoint
A lone surrogate or a noncharacter in a string.
ByteOrderMark
A byte order mark at the start of the file.
MissingFinalNewline
A JSON Lines file that does not end with a newline.
Implementations§
Source§impl Rule
impl Rule
Sourcepub fn description(self) -> &'static str
pub fn description(self) -> &'static str
A one-line description of what the rule reports, such as a key repeated in one object.
Sourcepub fn default_severity(self, dialect: Dialect) -> Severity
pub fn default_severity(self, dialect: Dialect) -> Severity
The rule’s severity when nothing overrides it.
Trait Implementations§
impl Copy for Rule
impl Eq for Rule
Source§impl Ord for Rule
impl Ord for Rule
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Rule
impl PartialOrd for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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