pub enum MathError {
UnsupportedCommand {
name: String,
span: Span,
},
Malformed {
what: String,
at: usize,
},
UnmappedChar {
ch: char,
span: Span,
},
}Expand description
Why a source string failed to parse (or, later, to lay out).
The shape is frozen by the G0-3 ratification note: three variants, with
the construct name of an unsupported command carried verbatim in the
construct table’s naming scheme (\substack, env:flushleft, …).
Variants§
UnsupportedCommand
A construct outside the implemented surface. name is in the G0-4
construct-table scheme (\substack, env:flushleft); the tier tag
in the rendered message comes from the registry.
Malformed
Structurally invalid input (unbalanced braces, a double superscript,
\right without \left, …).
UnmappedChar
A character with no glyph in the bundled math faces (a layout-stage error; the parser accepts every character).
Implementations§
Trait Implementations§
impl Eq for MathError
Source§impl Error for MathError
impl Error for MathError
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()
impl StructuralPartialEq for MathError
Auto Trait Implementations§
impl Freeze for MathError
impl RefUnwindSafe for MathError
impl Send for MathError
impl Sync for MathError
impl Unpin for MathError
impl UnsafeUnpin for MathError
impl UnwindSafe for MathError
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