#[non_exhaustive]pub enum WarningKind {
SectionLevelOutOfSequence {
got: u8,
markers: String,
},
UnterminatedTable {
delimiter: String,
},
Other(Cow<'static, str>),
}Expand description
Categorised non-fatal conditions.
Other is an escape hatch for ad-hoc messages the parser has not yet
been taught to categorise. New variants should be added as callers need
to assert on them programmatically (e.g. LSP mapping kind to LSP
diagnostic codes, or tests matching on specific conditions without
resorting to string comparison).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SectionLevelOutOfSequence
The document has a title (level 0) but the first section after it is not level 1. Matches asciidoctor’s “section title out of sequence” check.
Fields
UnterminatedTable
A table’s opening delimiter was matched but no corresponding closing delimiter was found before end of input. Matches asciidoctor’s “unterminated table block” warning.
delimiter is the literal opening token as it appeared in the
source (e.g. "|===", "!=====").
Other(Cow<'static, str>)
Ad-hoc message not yet categorised into a typed variant.
Trait Implementations§
Source§impl Clone for WarningKind
impl Clone for WarningKind
Source§fn clone(&self) -> WarningKind
fn clone(&self) -> WarningKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WarningKind
impl Debug for WarningKind
Source§impl Display for WarningKind
impl Display for WarningKind
Source§impl Error for WarningKind
impl Error for WarningKind
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()