pub enum MarkdownError {
Show 16 variants
HeadingLevelOutOfRange {
level: u8,
},
HeadingContentMultiline,
CodeBlockLanguageMultiline,
MarkerNameInvalid,
DocumentMissing,
HeadingNotFound {
level: u8,
},
HeadingAmbiguous {
level: u8,
},
HeadingInsideMarker {
level: u8,
name: String,
},
MarkerNotFound {
marker: String,
},
MarkerDuplicated {
marker: String,
},
MarkerNested {
marker: String,
},
MarkerBeginUnmatched {
marker: String,
},
MarkerEndUnmatched {
marker: String,
},
MarkerMalformed {
line: usize,
},
SelectorsOverlapping,
RenderFailed {
source: Error,
},
}Expand description
Error returned while validating, rendering, or reconciling Markdown.
Variants§
HeadingLevelOutOfRange
A heading level is outside 1..=6.
HeadingContentMultiline
A heading selector’s replacement content spans multiple lines.
CodeBlockLanguageMultiline
A code block’s language spans multiple lines.
MarkerNameInvalid
A marker name is empty or has leading or trailing whitespace.
DocumentMissing
Partial Markdown ownership was requested with no current document.
HeadingNotFound
A heading selector matched no heading in the current document.
HeadingAmbiguous
A heading selector matched more than one heading.
HeadingInsideMarker
A marker’s blocks render a heading at a level that a heading selector matches.
MarkerNotFound
A named marker was not found in the current document.
MarkerDuplicated
A begin marker uses a name that an earlier, closed region already has.
MarkerNested
A begin marker was opened while another region was still open.
MarkerBeginUnmatched
A begin marker has no matching end marker.
MarkerEndUnmatched
An end marker has no matching begin marker.
MarkerMalformed
A marker comment could not be parsed as a begin or end marker.
SelectorsOverlapping
Two or more selectors target overlapping ranges.
RenderFailed
Comrak failed to render the Markdown AST to text.
Trait Implementations§
Source§impl Debug for MarkdownError
impl Debug for MarkdownError
Source§impl Display for MarkdownError
impl Display for MarkdownError
Source§impl Error for MarkdownError
impl Error for MarkdownError
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()