pub enum Expr {
Show 16 variants
Pi,
Real(f32),
Int(usize),
Var(Symbol),
Add(Span<Expr>, Span<Expr>),
Sub(Span<Expr>, Span<Expr>),
Mul(Span<Expr>, Span<Expr>),
Div(Span<Expr>, Span<Expr>),
Pow(Span<Expr>, Span<Expr>),
Neg(Span<Expr>),
Sin(Span<Expr>),
Cos(Span<Expr>),
Tan(Span<Expr>),
Exp(Span<Expr>),
Ln(Span<Expr>),
Sqrt(Span<Expr>),
}Expand description
A parameter expression.
Variants
Pi
The circle constant Pi.
Real(f32)
An arbitrary real number.
Int(usize)
An integer.
Var(Symbol)
A defined parameter.
Add(Span<Expr>, Span<Expr>)
The addition of two expressions.
Sub(Span<Expr>, Span<Expr>)
The subtraction of two expressions.
Mul(Span<Expr>, Span<Expr>)
The multiplication of two expressions.
Div(Span<Expr>, Span<Expr>)
The division of two expressions.
Pow(Span<Expr>, Span<Expr>)
The exponentiation of two expressions.
Neg(Span<Expr>)
The negation of an expression.
Sin(Span<Expr>)
The sine of an expression.
Cos(Span<Expr>)
The cosine of an expression.
Tan(Span<Expr>)
The tangent of an expression.
Exp(Span<Expr>)
The exponential of an expression.
Ln(Span<Expr>)
The natural logarithm of an expression.
Sqrt(Span<Expr>)
The square root of an expression.
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Expr
impl<'de> Deserialize<'de> for Expr
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'a, D: DocAllocator<'a>> Pretty<'a, D, ()> for Expr
impl<'a, D: DocAllocator<'a>> Pretty<'a, D, ()> for Expr
sourcefn pretty(self, alloc: &'a D) -> DocBuilder<'a, D>
fn pretty(self, alloc: &'a D) -> DocBuilder<'a, D>
Converts self into a document
Auto Trait Implementations
impl RefUnwindSafe for Expr
impl !Send for Expr
impl !Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more