#[non_exhaustive]pub enum DiagnosticCode {
Unparsable,
UnknownOperator,
NotAnOperator,
ArgumentForm,
ArgumentCount,
InvalidTimezone,
SimilarToOperator,
Compile,
OperatorCheck,
}Expand description
What a Diagnostic is about. Serialised as the variant name.
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.
Unparsable
The rule is not valid JSON.
UnknownOperator
A single-key object whose key is no operator this engine knows.
NotAnOperator
An object with several keys outside templating mode, where only an operator call (one key) is valid.
ArgumentForm
and, or or if given a single argument instead of an array.
ArgumentCount
An argument count the operator rejects (an error), or arguments it never evaluates (a warning).
InvalidTimezone
A literal timezone name that is not in the timezone database.
SimilarToOperator
In a template, a key that is an output field but is one edit away from an operator name.
Compile
The compiler rejected the rule for a reason the checks above do not cover.
OperatorCheck
A custom operator’s own check
rejected the call.
Trait Implementations§
Source§impl Clone for DiagnosticCode
impl Clone for DiagnosticCode
impl Copy for DiagnosticCode
Source§impl Debug for DiagnosticCode
impl Debug for DiagnosticCode
impl Eq for DiagnosticCode
Source§impl Hash for DiagnosticCode
impl Hash for DiagnosticCode
Source§impl PartialEq for DiagnosticCode
impl PartialEq for DiagnosticCode
Source§impl Serialize for DiagnosticCode
impl Serialize for DiagnosticCode
impl StructuralPartialEq for DiagnosticCode
Auto Trait Implementations§
impl Freeze for DiagnosticCode
impl RefUnwindSafe for DiagnosticCode
impl Send for DiagnosticCode
impl Sync for DiagnosticCode
impl Unpin for DiagnosticCode
impl UnsafeUnpin for DiagnosticCode
impl UnwindSafe for DiagnosticCode
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