pub enum MathExpression {
Show 28 variants Mi(Mi), Mo(Operator), Mn(String), Msqrt(Box<MathExpression>), Mrow(Mrow), Mfrac(Box<MathExpression>, Box<MathExpression>), Msup(Box<MathExpression>, Box<MathExpression>), Msub(Box<MathExpression>, Box<MathExpression>), Munder(Box<MathExpression>, Box<MathExpression>), Mover(Box<MathExpression>, Box<MathExpression>), Msubsup(Box<MathExpression>, Box<MathExpression>, Box<MathExpression>), Mtext(String), Mstyle(Vec<MathExpression>), Mspace(String), MoLine(String), Ci(Ci), Differential(Differential), SummationMath(SummationMath), AbsoluteSup(Box<MathExpression>, Box<MathExpression>), Absolute(Box<MathExpression>, Box<MathExpression>), HatComp(HatComp), Integral(Integral), LaplacianComp(LaplacianComp), SurfaceIntegral(Box<MathExpression>), DownArrow(DownArrow), Minimize(Box<MathExpression>, Vec<MathExpression>), ExpMath(ExpMath), None,
}
Expand description

The MathExpression enum is not faithful to the corresponding element type in MathML 3 (https://www.w3.org/TR/MathML3/appendixa.html#parsing_MathExpression)

Variants§

§

Mi(Mi)

§

Mo(Operator)

§

Mn(String)

Represents numeric literals such as integers, decimals

§

Msqrt(Box<MathExpression>)

Represents square root elements

§

Mrow(Mrow)

§

Mfrac(Box<MathExpression>, Box<MathExpression>)

Represents the fraction of expressions where first argument is numerator content and second argument is denominator content

§

Msup(Box<MathExpression>, Box<MathExpression>)

Represents expressions where first argument is the base and second argument is the superscript

§

Msub(Box<MathExpression>, Box<MathExpression>)

Represents expressions where first argument is the base and second argument is the subscript

§

Munder(Box<MathExpression>, Box<MathExpression>)

Represents expressions where first argument is the base and second argument is the undersubscript

§

Mover(Box<MathExpression>, Box<MathExpression>)

Represents expressions where first argument is the base and second argument is the oversubscript

§

Msubsup(Box<MathExpression>, Box<MathExpression>, Box<MathExpression>)

Represents expressions where first argument is the base, second argument is the subscript, third argument is the superscript

§

Mtext(String)

Represents arbitrary text

§

Mstyle(Vec<MathExpression>)

Represents how elements can make changes to their style. E.g. displaystyle

§

Mspace(String)

Represents empty element with blanck space

§

MoLine(String)

Handles <mo …/>

§

Ci(Ci)

§

Differential(Differential)

§

SummationMath(SummationMath)

§

AbsoluteSup(Box<MathExpression>, Box<MathExpression>)

§

Absolute(Box<MathExpression>, Box<MathExpression>)

§

HatComp(HatComp)

§

Integral(Integral)

§

LaplacianComp(LaplacianComp)

§

SurfaceIntegral(Box<MathExpression>)

Represents closed surface integral over contents. E.g. \oiint_S ∇ \cdot T dS

§

DownArrow(DownArrow)

↓ as an operator e.g. I↓ indicates downward diffuse radiative fluxes per unit indcident flux

§

Minimize(Box<MathExpression>, Vec<MathExpression>)

§

ExpMath(ExpMath)

§

None

Implementations§

source§

impl MathExpression

source

pub fn new_mi(f0: Mi) -> Self

Constructs a new MathExpression::Mi.

source§

impl MathExpression

source

pub fn new_mo(f0: Operator) -> Self

Constructs a new MathExpression::Mo.

source§

impl MathExpression

source

pub fn new_mn(f0: String) -> Self

Constructs a new MathExpression::Mn.

source§

impl MathExpression

source

pub fn new_msqrt(f0: Box<MathExpression>) -> Self

Constructs a new MathExpression::Msqrt.

source§

impl MathExpression

source

pub fn new_mrow(f0: Mrow) -> Self

Constructs a new MathExpression::Mrow.

source§

impl MathExpression

source

pub fn new_mfrac(f0: Box<MathExpression>, f1: Box<MathExpression>) -> Self

Constructs a new MathExpression::Mfrac.

source§

impl MathExpression

source

pub fn new_msup(f0: Box<MathExpression>, f1: Box<MathExpression>) -> Self

Constructs a new MathExpression::Msup.

source§

impl MathExpression

source

pub fn new_msub(f0: Box<MathExpression>, f1: Box<MathExpression>) -> Self

Constructs a new MathExpression::Msub.

source§

impl MathExpression

source

pub fn new_munder(f0: Box<MathExpression>, f1: Box<MathExpression>) -> Self

Constructs a new MathExpression::Munder.

source§

impl MathExpression

source

pub fn new_mover(f0: Box<MathExpression>, f1: Box<MathExpression>) -> Self

Constructs a new MathExpression::Mover.

source§

impl MathExpression

source

pub fn new_msubsup( f0: Box<MathExpression>, f1: Box<MathExpression>, f2: Box<MathExpression> ) -> Self

Constructs a new MathExpression::Msubsup.

source§

impl MathExpression

source

pub fn new_mtext(f0: String) -> Self

Constructs a new MathExpression::Mtext.

source§

impl MathExpression

source

pub fn new_mstyle(f0: Vec<MathExpression>) -> Self

Constructs a new MathExpression::Mstyle.

source§

impl MathExpression

source

pub fn new_mspace(f0: String) -> Self

Constructs a new MathExpression::Mspace.

source§

impl MathExpression

source

pub fn new_mo_line(f0: String) -> Self

Constructs a new MathExpression::MoLine.

source§

impl MathExpression

source

pub fn new_ci(f0: Ci) -> Self

Constructs a new MathExpression::Ci.

source§

impl MathExpression

source

pub fn new_differential(f0: Differential) -> Self

Constructs a new MathExpression::Differential.

source§

impl MathExpression

source

pub fn new_summation_math(f0: SummationMath) -> Self

Constructs a new MathExpression::SummationMath.

source§

impl MathExpression

source

pub fn new_absolute_sup( f0: Box<MathExpression>, f1: Box<MathExpression> ) -> Self

Constructs a new MathExpression::AbsoluteSup.

source§

impl MathExpression

source

pub fn new_absolute(f0: Box<MathExpression>, f1: Box<MathExpression>) -> Self

Constructs a new MathExpression::Absolute.

source§

impl MathExpression

source

pub fn new_hat_comp(f0: HatComp) -> Self

Constructs a new MathExpression::HatComp.

source§

impl MathExpression

source

pub fn new_integral(f0: Integral) -> Self

Constructs a new MathExpression::Integral.

source§

impl MathExpression

source

pub fn new_laplacian_comp(f0: LaplacianComp) -> Self

Constructs a new MathExpression::LaplacianComp.

source§

impl MathExpression

source

pub fn new_surface_integral(f0: Box<MathExpression>) -> Self

Constructs a new MathExpression::SurfaceIntegral.

source§

impl MathExpression

source

pub fn new_down_arrow(f0: DownArrow) -> Self

Constructs a new MathExpression::DownArrow.

source§

impl MathExpression

source

pub fn new_minimize(f0: Box<MathExpression>, f1: Vec<MathExpression>) -> Self

Constructs a new MathExpression::Minimize.

source§

impl MathExpression

source

pub fn new_exp_math(f0: ExpMath) -> Self

Constructs a new MathExpression::ExpMath.

source§

impl MathExpression

source

pub fn new_none() -> Self

Constructs a new MathExpression::None.

source§

impl MathExpression

source

pub fn add_to_graph<'a>( &'a self, graph: &mut ASTGraph<'a>, parent_index: Option<NodeIndex> )

source§

impl MathExpression

source

pub fn get_string_repr(&self) -> String

Get the string representation of a MathExpression

Trait Implementations§

source§

impl Clone for MathExpression

source§

fn clone(&self) -> MathExpression

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 MathExpression

source§

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

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

impl Default for MathExpression

source§

fn default() -> MathExpression

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for MathExpression

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for MathExpression

source§

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

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

impl Hash for MathExpression

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl JsonSchema for MathExpression

source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
source§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
source§

impl Ord for MathExpression

source§

fn cmp(&self, other: &MathExpression) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for MathExpression

source§

fn eq(&self, other: &MathExpression) -> 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 PartialOrd for MathExpression

source§

fn partial_cmp(&self, other: &MathExpression) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for MathExpression

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'__s> ToSchema<'__s> for MathExpression

source§

fn schema() -> (&'__s str, RefOr<Schema>)

Return a tuple of name and schema or reference to a schema that can be referenced by the name or inlined directly to responses, request bodies or parameters.
source§

fn aliases() -> Vec<(&'__s str, Schema)>

Optional set of alias schemas for the ToSchema::schema. Read more
source§

impl Eq for MathExpression

source§

impl StructuralPartialEq for MathExpression

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

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

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,