pub enum MdxSignal {
Error(String, usize),
Eof(String),
Ok,
}
Expand description
Signal used as feedback when parsing MDX ESM/expressions.
Variants§
Error(String, usize)
A syntax error.
markdown-rs
will crash with error message String
, and convert the
usize
(byte offset into &str
passed to MdxExpressionParse
or
MdxEsmParse
) to where it happened in the whole document.
Examples
ⓘ
Signal::Error("Unexpected `\"`, expected identifier".into(), 1)
Eof(String)
An error at the end of the (partial?) expression.
markdown-rs
will either crash with error message String
if it
doesn’t have any more text, or it will try again later when more text
is available.
Examples
ⓘ
Signal::Eof("Unexpected end of file in string literal".into())
Ok
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Signal
impl Send for Signal
impl Sync for Signal
impl Unpin for Signal
impl UnwindSafe for Signal
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