pub enum DiagnosticCode {
Show 51 variants
ParseFailure,
InvalidHeadingLevel,
EmptyHeadingText,
DuplicateHeadingId,
HeadingTooLong,
EmptyLinkUrl,
UnsafeLinkProtocol,
InsecureLinkProtocol,
UnresolvedLinkReference,
EmptyLinkReferenceLabel,
EmptyCodeBlock,
MissingCodeBlockLanguage,
EmptyImageUrl,
ImageMissingAltText,
UnsafeImageProtocol,
InlineHtmlContainsScript,
InlineHtmlJavascriptUrl,
InlineHtmlUnsafeEventHandler,
HtmlBlockContainsScript,
HtmlBlockJavascriptUrl,
EmptyHtmlBlock,
HtmlBlockMismatchedAngles,
HtmlBlockUnsafeEventHandler,
EmptyList,
EmptyListItem,
MalformedTaskCheckbox,
EmptyTaskListItem,
EmptyBlockquote,
EmptyDefinitionList,
EmptyDefinitionTerm,
EmptyDefinitionDescription,
EmptyTableCell,
MissingFootnoteDefinition,
DuplicateFootnoteDefinition,
UnusedFootnoteDefinition,
EmptyTabGroup,
EmptyTabTitle,
DuplicateTabTitle,
EmptyTabPanel,
EmptySliderDeck,
EmptySlide,
EmptyAdmonitionBody,
EmptyMathExpression,
EmptyMermaidDiagram,
EmptyAdmonitionTitle,
UnknownAdmonitionKind,
InvalidSliderTimer,
EmptyPlatformMentionUsername,
UnknownPlatformMentionPlatform,
UnknownEmojiShortcode,
EmptyPlatformMentionDisplayName,
}Expand description
Stable diagnostic codes for markdown intelligence.
These identifiers are intended to be stable across releases so frontend components (status panes, filters, telemetry) can rely on them.
Variants§
ParseFailure
InvalidHeadingLevel
EmptyHeadingText
DuplicateHeadingId
HeadingTooLong
EmptyLinkUrl
UnsafeLinkProtocol
InsecureLinkProtocol
UnresolvedLinkReference
EmptyLinkReferenceLabel
EmptyCodeBlock
MissingCodeBlockLanguage
EmptyImageUrl
ImageMissingAltText
UnsafeImageProtocol
InlineHtmlContainsScript
InlineHtmlJavascriptUrl
InlineHtmlUnsafeEventHandler
HtmlBlockContainsScript
HtmlBlockJavascriptUrl
EmptyHtmlBlock
HtmlBlockMismatchedAngles
HtmlBlockUnsafeEventHandler
EmptyList
EmptyListItem
MalformedTaskCheckbox
EmptyTaskListItem
EmptyBlockquote
EmptyDefinitionList
EmptyDefinitionTerm
EmptyDefinitionDescription
EmptyTableCell
MissingFootnoteDefinition
DuplicateFootnoteDefinition
UnusedFootnoteDefinition
EmptyTabGroup
EmptyTabTitle
DuplicateTabTitle
EmptyTabPanel
EmptySliderDeck
EmptySlide
EmptyAdmonitionBody
EmptyMathExpression
EmptyMermaidDiagram
EmptyAdmonitionTitle
UnknownAdmonitionKind
InvalidSliderTimer
EmptyPlatformMentionUsername
UnknownPlatformMentionPlatform
UnknownEmojiShortcode
EmptyPlatformMentionDisplayName
Implementations§
Source§impl DiagnosticCode
impl DiagnosticCode
pub fn catalog_key(self) -> String
pub fn as_str(self) -> &'static str
Sourcepub fn default_message(self) -> &'static str
pub fn default_message(self) -> &'static str
Default user-facing diagnostic message sourced from embedded catalog metadata.
Sourcepub fn message_template(self) -> &'static str
pub fn message_template(self) -> &'static str
Catalog-provided message template (or title when template is absent).
Sourcepub fn default_severity(self) -> DiagnosticSeverity
pub fn default_severity(self) -> DiagnosticSeverity
Resolve the default diagnostic severity from catalog metadata.
Sourcepub fn format_message(self, pairs: &[(&str, String)]) -> String
pub fn format_message(self, pairs: &[(&str, String)]) -> String
Format message template placeholders like {protocol} with values.
Sourcepub fn catalog_entry(self) -> Option<&'static DiagnosticsCatalogEntry>
pub fn catalog_entry(self) -> Option<&'static DiagnosticsCatalogEntry>
Optional embedded catalog entry for this diagnostic code.
Sourcepub fn fix_suggestion(self) -> &'static str
pub fn fix_suggestion(self) -> &'static str
Fix suggestion sourced from the embedded diagnostics catalog.
Sourcepub fn fix_suggestion_resolved(self) -> Cow<'static, str>
pub fn fix_suggestion_resolved(self) -> Cow<'static, str>
Resolve fix suggestion as a Cow for UI integration.
Trait Implementations§
Source§impl Clone for DiagnosticCode
impl Clone for DiagnosticCode
Source§fn clone(&self) -> DiagnosticCode
fn clone(&self) -> DiagnosticCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiagnosticCode
impl Debug for DiagnosticCode
Source§impl Hash for DiagnosticCode
impl Hash for DiagnosticCode
Source§impl PartialEq for DiagnosticCode
impl PartialEq for DiagnosticCode
impl Copy for DiagnosticCode
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.