Enum mathemascii::VarKind
source · pub enum VarKind {
Function(Function),
Number(String),
Greek(Greek),
Variable(String),
Arrow(Arrow),
Relation(Relation),
Logical(Logical),
Operator(Operator),
UnknownOperator(String),
Other(Other),
Text(String),
}
Expand description
Kinds of “variables” in Ascii math.
Variants§
Function(Function)
Function identifier, i.e. f
in f(x)
.
Number(String)
Number, i.e. 1
in 1 + 2
.
Greek(Greek)
Greek letter, i.e. alpha
or pi
.
Variable(String)
Variable identifier, almost any letter i.e. x
in f(x)
.
Arrow(Arrow)
Arrow, i.e. ->
or =>
.
Relation(Relation)
Relation, i.e. =
or !=
.
Logical(Logical)
Logical operator, i.e. and
or or
.
Operator(Operator)
Operator, i.e. +
or -
.
UnknownOperator(String)
Non-letter symbols not recognized by other keyword definitions fall back to operator, i.e.
;
or .
.
Other(Other)
Other symbols, like comma (,
) for example.
Text(String)
Text, i.e. "hello"
or text(hello)
.
Trait Implementations§
source§impl Ord for VarKind
impl Ord for VarKind
source§impl PartialEq for VarKind
impl PartialEq for VarKind
source§impl PartialOrd for VarKind
impl PartialOrd for VarKind
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moreimpl Eq for VarKind
impl StructuralEq for VarKind
impl StructuralPartialEq for VarKind
Auto Trait Implementations§
impl RefUnwindSafe for VarKind
impl Send for VarKind
impl Sync for VarKind
impl Unpin for VarKind
impl UnwindSafe for VarKind
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