pub enum RenderError {
EngineCreation {
diags: Vec<Diagnostic>,
},
InvalidFrontmatter {
diags: Vec<Diagnostic>,
},
CompilationFailed {
diags: Vec<Diagnostic>,
},
FormatNotSupported {
diags: Vec<Diagnostic>,
},
UnsupportedBackend {
diags: Vec<Diagnostic>,
},
ValidationFailed {
diags: Vec<Diagnostic>,
},
QuillConfig {
diags: Vec<Diagnostic>,
},
}Expand description
Main error type for rendering operations.
Every variant carries a non-empty diags: Vec<Diagnostic>. Variants whose
failure is inherently a single diagnostic still carry a one-element vector
— the uniform shape lets every consumer, and every language binding,
handle all rendering errors through a single code path. See
RenderError::diagnostics and RenderError::into_diagnostics. The
variant itself records the kind of failure (which bindings map to typed
exceptions); the payload is always just the diagnostics.
Variants§
EngineCreation
Failed to create rendering engine.
Fields
diags: Vec<Diagnostic>Diagnostics describing the failure. Always non-empty.
InvalidFrontmatter
Invalid YAML frontmatter in markdown document.
Fields
diags: Vec<Diagnostic>Diagnostics describing the failure. Always non-empty.
CompilationFailed
Backend compilation failed with one or more errors.
Fields
diags: Vec<Diagnostic>All compilation diagnostics. Always non-empty.
FormatNotSupported
Requested output format not supported by backend.
Fields
diags: Vec<Diagnostic>Diagnostics describing the failure. Always non-empty.
UnsupportedBackend
Backend not registered with engine.
Fields
diags: Vec<Diagnostic>Diagnostics describing the failure. Always non-empty.
ValidationFailed
Validation failed for parsed document — may carry multiple diagnostics
when several problems are detected during a single validation pass
(e.g. multiple missing required fields). Each diagnostic should set
path to anchor the error at a specific location in the document model.
Fields
diags: Vec<Diagnostic>All validation diagnostics. Always non-empty.
QuillConfig
Quill configuration error — may carry multiple diagnostics when several problems are detected during parsing (e.g. several unknown keys at once).
Fields
diags: Vec<Diagnostic>All configuration diagnostics. Always non-empty.
Implementations§
Source§impl RenderError
impl RenderError
Sourcepub fn diagnostics(&self) -> &[Diagnostic]
pub fn diagnostics(&self) -> &[Diagnostic]
All diagnostics carried by this error, in order. Always non-empty.
Sourcepub fn into_diagnostics(self) -> Vec<Diagnostic>
pub fn into_diagnostics(self) -> Vec<Diagnostic>
Consume the error and return its diagnostics. Always non-empty.
Trait Implementations§
Source§impl Debug for RenderError
impl Debug for RenderError
Source§impl Display for RenderError
impl Display for RenderError
Source§impl Error for RenderError
impl Error for RenderError
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()
Source§impl From<ParseError> for RenderError
Convert ParseError to RenderError
impl From<ParseError> for RenderError
Convert ParseError to RenderError