#[non_exhaustive]pub enum WarningKind {
Show 17 variants
SectionLevelOutOfSequence {
expected: u8,
got: u8,
},
NestedSectionInBibliography,
NestedSectionInIndex,
UnterminatedTable {
delimiter: String,
},
UnterminatedDelimitedBlock {
kind: &'static str,
delimiter: String,
},
TableUnknownFormat {
format: String,
},
TableIncompleteRow,
TableCellOverflow {
actual: usize,
expected: usize,
},
TableColumnCount {
actual: usize,
expected: usize,
occupied_from_rowspans: usize,
},
NonStandardAuthorLine {
line: String,
},
UnresolvedReference {
target: String,
},
DuplicateId {
id: String,
first: Box<SourceLocation>,
},
ConflictingFootnote {
id: String,
first: Box<SourceLocation>,
},
LegacyFloatDiscreteHeading,
InvalidDocumentAttribute {
name: String,
value: String,
expected: &'static str,
},
ContentRecovery {
message: Cow<'static, str>,
},
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
A section title skips a level relative to its parent — either the first section after the document title is deeper than level 1, or a nested section jumps more than one level below its parent. Matches asciidoctor’s “section title out of sequence” check; the section is still rendered at its literal level.
Fields
NestedSectionInBibliography
A bibliography section contains a direct child section. The child is retained in the document, matching Asciidoctor’s recovery behavior.
NestedSectionInIndex
An index contains a direct child section. The child remains in the AST; each converter applies its usual index-content policy.
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. "|===", "!=====").
UnterminatedDelimitedBlock
A delimited block’s opening delimiter was matched but no corresponding
closing delimiter was found before end of input. Matches asciidoctor’s
“unterminated UnterminatedTable
variant.
delimiter is the literal opening token as it appeared in the source
(e.g. "====", "----").
Fields
TableUnknownFormat
A table declared an unsupported format attribute, so the parser fell
back to the table delimiter’s default separator.
TableIncompleteRow
A table ended with cells that could not fill a complete row, so those trailing cells were dropped.
TableCellOverflow
A table row contained a cell/span that exceeded the configured column count, so the row was dropped.
TableColumnCount
A table row’s logical column count did not match the configured column count, so the row was dropped.
Fields
NonStandardAuthorLine
A document header author line did not match the structured
firstname [middlename] [lastname] [<email>] form, so the whole line
was kept as a single author’s name. asciidoctor accepts this silently;
acdc surfaces it so a malformed author line is easy to spot.
UnresolvedReference
A cross-reference (<<id>> / xref:id[]) points at an id that is not
defined anywhere in the document. Matches asciidoctor’s “invalid
reference” warning.
DuplicateId
More than one source definition uses the same ID. References keep the first.
Fields
first: Box<SourceLocation>The first definition, including its original file and position.
ConflictingFootnote
A named footnote is repeated with different text. The first body is retained.
Fields
first: Box<SourceLocation>The first definition, including its original file and position.
LegacyFloatDiscreteHeading
A discrete heading was marked with the legacy float attribute rather
than discrete. float is only supported because an older version of
AsciiDoc called discrete headings “floating titles”; the current spec
prefers discrete.
InvalidDocumentAttribute
A document attribute value did not match its documented domain. The previous effective value remains active.
Fields
ContentRecovery
Requested source content or substitutions were omitted, replaced, or recovered.
Rendering can continue, but consumers that require complete source content must handle this condition before using the recovered document.
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§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()