pub enum MathML {
Show 20 variants Root(Box<MathRoot>), Row(Box<MathRow>), Space(Box<MathSpace>), Number(Box<MathNumber>), Identifier(Box<MathIdentifier>), Text(Box<MathText>), Operator(Box<MathOperator>), MultiScripts(Box<MathMultiScript>), UnderOver(Box<MathUnderOver>), Function(Box<MathFunction>), Sqrt(Box<MathSqrt>), Frac(Box<MathFraction>), Phantom(Box<MathPhantom>), Style(Box<MathStyle>), Fenced(Box<MathFenced>), Table(Box<MathTable>), Undefined(Box<MathError>), Ampersand, NewLine, Nothing,
}
Expand description

Represent the MathML AST node, For semantic considerations, not exactly the same as the standard.

Variants§

§

Root(Box<MathRoot>)

§

Row(Box<MathRow>)

§

Space(Box<MathSpace>)

§

Number(Box<MathNumber>)

§

Identifier(Box<MathIdentifier>)

§

Text(Box<MathText>)

§

Operator(Box<MathOperator>)

§

MultiScripts(Box<MathMultiScript>)

§

UnderOver(Box<MathUnderOver>)

§

Function(Box<MathFunction>)

Used for compatibility of \operatorname in LaTeX

§

Sqrt(Box<MathSqrt>)

§

Frac(Box<MathFraction>)

§

Phantom(Box<MathPhantom>)

§

Style(Box<MathStyle>)

§

Fenced(Box<MathFenced>)

<mfenced>, but polyfill as <mrow>

§

Table(Box<MathTable>)

§

Undefined(Box<MathError>)

Used for unknown element

§

Ampersand

Used for compatibility of & in LaTeX

§

NewLine

Used for compatibility of \\ in LaTeX

§

Nothing

Used for compatibility of &nbsp; in HTML

Implementations§

source§

impl MathML

source

pub fn identifier<S>(text: S) -> MathML
where S: ToString,

Creates a new MathIdentifier with the FontVariant::Italic variant.

source

pub fn text<S>(text: S) -> MathML
where S: ToString,

Creates a new MathText with the FontVariant::Normal variant.

source

pub fn string<S>(text: S) -> MathML
where S: ToString,

Creates a new MathText with the FontVariant::Normal variant.

source§

impl MathML

source

pub fn number<N>(n: N) -> MathML
where N: Into<MathNumber>,

Creates a new MathNumber with the given number.

source

pub fn fraction<N, D>(numerator: N, denominator: D) -> MathML
where N: Into<MathML>, D: Into<MathML>,

Creates a new MathFraction with the given numerator and denominator.

source

pub fn error<S>(message: S) -> MathML
where S: ToString,

Creates a new MathError with the given message.

source§

impl MathML

source

pub fn operation<S>(text: S) -> MathML
where S: ToString,

Create a new MathML element with the given tag name.

Trait Implementations§

source§

impl Clone for MathML

source§

fn clone(&self) -> MathML

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MathML

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for MathML

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Executed for MathML

source§

fn mime_type(&self) -> String

The mime type of the result.
source§

fn as_json(&self, _: &JupyterContext) -> Value

Convert the result to json.
source§

impl From<MathError> for MathML

source§

fn from(value: MathError) -> MathML

Converts to this type from the input type.
source§

impl From<MathFenced> for MathML

source§

fn from(value: MathFenced) -> MathML

Converts to this type from the input type.
source§

impl From<MathFraction> for MathML

source§

fn from(value: MathFraction) -> MathML

Converts to this type from the input type.
source§

impl From<MathFunction> for MathML

source§

fn from(value: MathFunction) -> MathML

Converts to this type from the input type.
source§

impl From<MathIdentifier> for MathML

source§

fn from(value: MathIdentifier) -> MathML

Converts to this type from the input type.
source§

impl From<MathMultiScript> for MathML

source§

fn from(value: MathMultiScript) -> MathML

Converts to this type from the input type.
source§

impl From<MathNumber> for MathML

source§

fn from(value: MathNumber) -> MathML

Converts to this type from the input type.
source§

impl From<MathOperator> for MathML

source§

fn from(value: MathOperator) -> MathML

Converts to this type from the input type.
source§

impl From<MathPhantom> for MathML

source§

fn from(value: MathPhantom) -> MathML

Converts to this type from the input type.
source§

impl From<MathRoot> for MathML

source§

fn from(value: MathRoot) -> MathML

Converts to this type from the input type.
source§

impl From<MathRow> for MathML

source§

fn from(value: MathRow) -> MathML

Converts to this type from the input type.
source§

impl From<MathSpace> for MathML

source§

fn from(value: MathSpace) -> MathML

Converts to this type from the input type.
source§

impl From<MathSqrt> for MathML

source§

fn from(value: MathSqrt) -> MathML

Converts to this type from the input type.
source§

impl From<MathStyle> for MathML

source§

fn from(value: MathStyle) -> MathML

Converts to this type from the input type.
source§

impl From<MathTable> for MathML

source§

fn from(value: MathTable) -> MathML

Converts to this type from the input type.
source§

impl From<MathText> for MathML

source§

fn from(value: MathText) -> MathML

Converts to this type from the input type.
source§

impl From<MathUnderOver> for MathML

source§

fn from(value: MathUnderOver) -> MathML

Converts to this type from the input type.
source§

impl From<char> for MathML

source§

fn from(value: char) -> MathML

Converts to this type from the input type.
source§

impl From<f32> for MathML

source§

fn from(value: f32) -> MathML

Converts to this type from the input type.
source§

impl From<f64> for MathML

source§

fn from(value: f64) -> MathML

Converts to this type from the input type.
source§

impl From<i128> for MathML

source§

fn from(value: i128) -> MathML

Converts to this type from the input type.
source§

impl From<i16> for MathML

source§

fn from(value: i16) -> MathML

Converts to this type from the input type.
source§

impl From<i32> for MathML

source§

fn from(value: i32) -> MathML

Converts to this type from the input type.
source§

impl From<i64> for MathML

source§

fn from(value: i64) -> MathML

Converts to this type from the input type.
source§

impl From<i8> for MathML

source§

fn from(value: i8) -> MathML

Converts to this type from the input type.
source§

impl From<isize> for MathML

source§

fn from(value: isize) -> MathML

Converts to this type from the input type.
source§

impl From<u128> for MathML

source§

fn from(value: u128) -> MathML

Converts to this type from the input type.
source§

impl From<u16> for MathML

source§

fn from(value: u16) -> MathML

Converts to this type from the input type.
source§

impl From<u32> for MathML

source§

fn from(value: u32) -> MathML

Converts to this type from the input type.
source§

impl From<u64> for MathML

source§

fn from(value: u64) -> MathML

Converts to this type from the input type.
source§

impl From<u8> for MathML

source§

fn from(value: u8) -> MathML

Converts to this type from the input type.
source§

impl From<usize> for MathML

source§

fn from(value: usize) -> MathML

Converts to this type from the input type.
source§

impl PartialEq for MathML

source§

fn eq(&self, other: &MathML) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for MathML

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more