[][src]Trait evalexpr::Configuration

pub trait Configuration {
    fn get_value(&self, identifier: &str) -> Option<&Value>;
fn get_function(&self, identifier: &str) -> Option<&Function>; }

A configuration for an expression tree.

A configuration defines methods to retrieve values and functions for literals in an expression tree. This crate implements two basic variants, the EmptyConfiguration, that returns None for each identifier, and the HashMapConfiguration, that stores its mappings in hash maps.

Required methods

fn get_value(&self, identifier: &str) -> Option<&Value>

Returns the value that is linked to the given identifier.

fn get_function(&self, identifier: &str) -> Option<&Function>

Returns the function that is linked to the given identifier.

Loading content...

Implementors

impl Configuration for EmptyConfiguration[src]

impl Configuration for HashMapConfiguration[src]

Loading content...