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

This is supported on crate feature pretty only.

Pretty-print this object to a string. For more fine-grained control, use the pretty::Pretty trait from the pretty crate directly.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Converts self into a document

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.