pub struct LatexError<'source>(pub usize, pub LatexErrKind<'source>);Expand description
Represents an error that occurred during LaTeX parsing or rendering.
Tuple Fields§
§0: usize§1: LatexErrKind<'source>Implementations§
Source§impl LatexError<'_>
impl LatexError<'_>
Sourcepub fn to_html(
&self,
latex: &str,
display: MathDisplay,
css_class: Option<&str>,
) -> String
pub fn to_html( &self, latex: &str, display: MathDisplay, css_class: Option<&str>, ) -> String
Format a LaTeX error as an HTML snippet.
§Arguments
latex: The original LaTeX input that caused the error.display: The display mode of the equation (inline or block).css_class: An optional CSS class to apply to the error element. IfNone, defaults to"math-core-error".
Trait Implementations§
Source§impl<'source> Clone for LatexError<'source>
impl<'source> Clone for LatexError<'source>
Source§fn clone(&self) -> LatexError<'source>
fn clone(&self) -> LatexError<'source>
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<'source> Debug for LatexError<'source>
impl<'source> Debug for LatexError<'source>
Source§impl Display for LatexError<'_>
impl Display for LatexError<'_>
Source§impl Error for LatexError<'_>
impl Error for LatexError<'_>
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()
Auto Trait Implementations§
impl<'source> Freeze for LatexError<'source>
impl<'source> RefUnwindSafe for LatexError<'source>
impl<'source> Send for LatexError<'source>
impl<'source> Sync for LatexError<'source>
impl<'source> Unpin for LatexError<'source>
impl<'source> UnwindSafe for LatexError<'source>
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