pub enum DiagnosticCategory {
Syntax,
Semantic,
Layout,
Text,
Pdf,
Io,
Internal,
}Expand description
What kind of thing a diagnostic describes.
Category is metadata, never identity. The catalog groups by this so a
rule can change phase (parser → evaluator, fonts → text shaping)
without breaking its stable DiagnosticCode.
§Examples
use mos_core::{DiagnosticCategory, codes};
assert_eq!(codes::MOS0033.category(), DiagnosticCategory::Semantic);Variants§
Syntax
Surface syntax: tokenisation, directive shape, inline grammar.
Semantic
Semantic lowering: name resolution, schema validation, references.
Layout
Page geometry, paper sizes, style application.
Text
Text shaping, glyph coverage, font selection.
PDF backend emission and packaging.
Io
Filesystem and asset I/O (read failure, decode failure, …).
Internal
Compiler-internal invariants (should never reach end users).
Trait Implementations§
Source§impl Clone for DiagnosticCategory
impl Clone for DiagnosticCategory
Source§fn clone(&self) -> DiagnosticCategory
fn clone(&self) -> DiagnosticCategory
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 DiagnosticCategory
impl Debug for DiagnosticCategory
Source§impl Display for DiagnosticCategory
impl Display for DiagnosticCategory
Source§impl Hash for DiagnosticCategory
impl Hash for DiagnosticCategory
Source§impl Ord for DiagnosticCategory
impl Ord for DiagnosticCategory
Source§fn cmp(&self, other: &DiagnosticCategory) -> Ordering
fn cmp(&self, other: &DiagnosticCategory) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DiagnosticCategory
impl PartialEq for DiagnosticCategory
Source§impl PartialOrd for DiagnosticCategory
impl PartialOrd for DiagnosticCategory
impl Copy for DiagnosticCategory
impl Eq for DiagnosticCategory
impl StructuralPartialEq for DiagnosticCategory
Auto Trait Implementations§
impl Freeze for DiagnosticCategory
impl RefUnwindSafe for DiagnosticCategory
impl Send for DiagnosticCategory
impl Sync for DiagnosticCategory
impl Unpin for DiagnosticCategory
impl UnsafeUnpin for DiagnosticCategory
impl UnwindSafe for DiagnosticCategory
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