pub enum ParseError {
InputTooLarge {
size: usize,
max: usize,
},
InvalidStructure(String),
EmptyInput(String),
MissingQuill(String),
InvalidQuillReference {
value: String,
reason: String,
},
YamlErrorWithLocation {
message: String,
line: usize,
block_index: usize,
hint: Option<String>,
},
}Variants§
InputTooLarge
InvalidStructure(String)
EmptyInput(String)
Markdown input was empty or whitespace-only.
Emitted as code parse::empty_input so consumers can pattern-match
without inspecting the message text.
MissingQuill(String)
The document is missing its root ~~~ card-yaml block, or that block
does not declare the required $quill system metadata.
Emitted as code parse::missing_quill so consumers can
pattern-match without inspecting the message text.
InvalidQuillReference
A $quill reference failed to parse as a crate::version::QuillReference.
Code parse::invalid_quill_reference; carries
crate::version::quill_ref_hint as its diagnostic hint.
YamlErrorWithLocation
Fields
Implementations§
Source§impl ParseError
impl ParseError
pub fn to_diagnostic(&self) -> Diagnostic
Trait Implementations§
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
impl Error for ParseError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ParseError> for RenderError
impl From<ParseError> for RenderError
Source§fn from(err: ParseError) -> Self
fn from(err: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin for ParseError
impl UnwindSafe for ParseError
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