#[non_exhaustive]pub enum MathExpr {
Show 17 variants
Row(Vec<MathExpr>),
Identifier(String),
Number(String),
Operator(String),
OperatorWithMetadata {
text: String,
lspace: Option<f32>,
rspace: Option<f32>,
large_operator: Option<bool>,
movable_limits: Option<bool>,
},
Text(String),
Space(f32),
Fraction {
numerator: Arc<MathExpr>,
denominator: Arc<MathExpr>,
},
Sqrt(Arc<MathExpr>),
Root {
base: Arc<MathExpr>,
index: Arc<MathExpr>,
},
Scripts {
base: Arc<MathExpr>,
sub: Option<Arc<MathExpr>>,
sup: Option<Arc<MathExpr>>,
},
UnderOver {
base: Arc<MathExpr>,
under: Option<Arc<MathExpr>>,
over: Option<Arc<MathExpr>>,
},
Accent {
base: Arc<MathExpr>,
accent: Arc<MathExpr>,
stretch: bool,
},
Fenced {
open: Option<String>,
close: Option<String>,
body: Arc<MathExpr>,
},
Table {
rows: Vec<Vec<MathExpr>>,
column_alignments: Vec<MathColumnAlignment>,
column_gap: Option<f32>,
row_gap: Option<f32>,
},
Source {
source: Range<usize>,
body: Arc<MathExpr>,
},
Error(String),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Row(Vec<MathExpr>)
Identifier(String)
Number(String)
Operator(String)
OperatorWithMetadata
Fields
Text(String)
Space(f32)
Fraction
Sqrt(Arc<MathExpr>)
Root
Scripts
UnderOver
Accent
Fenced
Table
Fields
§
column_alignments: Vec<MathColumnAlignment>Source
Error(String)
Implementations§
Source§impl MathExpr
impl MathExpr
pub fn row(children: impl IntoIterator<Item = MathExpr>) -> Self
pub fn source_range(&self) -> Option<&Range<usize>>
pub fn without_source(&self) -> &MathExpr
Trait Implementations§
impl StructuralPartialEq for MathExpr
Auto Trait Implementations§
impl Freeze for MathExpr
impl RefUnwindSafe for MathExpr
impl Send for MathExpr
impl Sync for MathExpr
impl Unpin for MathExpr
impl UnsafeUnpin for MathExpr
impl UnwindSafe for MathExpr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.