[][src]Trait fasteval::evalns::EvalNamespace

pub trait EvalNamespace {
    fn lookup(
        &mut self,
        name: &str,
        args: Vec<f64>,
        keybuf: &mut String
    ) -> Option<f64>; }

All fasteval Namespaces must implement the EvalNamespace trait.

Required methods

fn lookup(
    &mut self,
    name: &str,
    args: Vec<f64>,
    keybuf: &mut String
) -> Option<f64>

Perform a variable/function lookup.

May return cached values.

Loading content...

Implementations on Foreign Types

impl EvalNamespace for BTreeMap<String, f64>[src]

impl EvalNamespace for BTreeMap<&'static str, f64>[src]

impl EvalNamespace for Vec<BTreeMap<String, f64>>[src]

Loading content...

Implementors

impl EvalNamespace for EmptyNamespace[src]

fn lookup(
    &mut self,
    _name: &str,
    _args: Vec<f64>,
    _keybuf: &mut String
) -> Option<f64>
[src]

Always returns None, indicating that the variable is undefined.

impl<'_> EvalNamespace for CachedCallbackNamespace<'_>[src]

fn lookup(
    &mut self,
    name: &str,
    args: Vec<f64>,
    keybuf: &mut String
) -> Option<f64>
[src]

Returns a cached value if possible, otherwise delegates to the callback function.

impl<F> EvalNamespace for F where
    F: FnMut(&str, Vec<f64>) -> Option<f64>, 
[src]

Loading content...