[−][src]Trait fasteval::evaler::Evaler
You must use
this trait so you can call .eval()
.
Required methods
fn eval(&self, slab: &Slab, ns: &mut impl EvalNamespace) -> Result<f64, Error>
Evaluate this Expression
/Instruction
and return an f64
.
Returns a fasteval::Error
if there are any problems, such as undefined variables.
fn _var_names(&self, slab: &Slab, dst: &mut BTreeSet<String>)
Don't call this directly. Use var_names()
instead.
This exists because of ternary short-circuits; they prevent us from getting a complete list of vars just by doing eval() with a clever callback.
Provided methods
fn var_names(&self, slab: &Slab) -> BTreeSet<String>
Returns a list of variables and custom functions that are used by this Expression
/Instruction
.