Struct eval::Expr
[−]
[src]
pub struct Expr { /* fields omitted */ }
Expression builder
Methods
impl Expr
[src]
fn new<T: Into<String>>(expr: T) -> Expr
[src]
Create an expression.
fn function<T, F>(self, name: T, function: F) -> Expr where
T: Into<String>,
F: 'static + Fn(Vec<Value>) -> Result<Value, Error> + Sync + Send,
[src]
T: Into<String>,
F: 'static + Fn(Vec<Value>) -> Result<Value, Error> + Sync + Send,
Set function.
fn value<T, V>(self, name: T, value: V) -> Expr where
T: Into<String>,
V: Serialize,
[src]
T: Into<String>,
V: Serialize,
Set value.
fn compile(self) -> Result<Expr, Error>
[src]
Compile an expression. An expression can be compiled only once and then invoked multiple times with different context and function. You can also execute a expression without compile.
fn exec(&self) -> Result<Value, Error>
[src]
Execute the expression.
Trait Implementations
impl Clone for Expr
[src]
fn clone(&self) -> Expr
[src]
Returns a copy of the value. Notice that functions can not be cloned. The cloned expr's functions will be empty.
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more