#[non_exhaustive]pub enum WarningSeverity {
Debug,
Warning,
}Expand description
The severity of a Warning.
Every diagnostic this parser records is surfaced through
Document::warnings regardless of severity; a
host filters on this value to decide which diagnostics to act on. The
variants are ordered from least to most severe, so a host can select “at or
above” a threshold with an ordinary comparison – for example, keeping only
entries where warning.severity >= WarningSeverity::Warning suppresses the
low-severity Debug diagnostics.
A warning’s severity is an intrinsic property of its WarningType; it is
assigned when the warning is constructed and never varies from one
occurrence of a given type to another.
This enum is non_exhaustive: further severities may be recognized as the
parser grows, so a host matching on it needs a catch-all arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Debug
A low-severity diagnostic that a host is expected to suppress by
default. It reports something a host may wish to observe (for example,
via tooling or a verbose mode) but which does not, on its own, suggest
the parse result is wrong. Asciidoctor logs the equivalent messages
below its default WARN threshold.
Warning
A condition where the parse result might be unexpected. This is the severity of the overwhelming majority of this parser’s diagnostics and the level a host should surface by default.
Trait Implementations§
Source§impl Clone for WarningSeverity
impl Clone for WarningSeverity
Source§fn clone(&self) -> WarningSeverity
fn clone(&self) -> WarningSeverity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more