[][src]Trait fasteval::evalns::Cached

pub trait Cached {
    fn cache_create(&mut self, name: String, val: f64) -> Result<(), Error>;
fn cache_set(&mut self, name: String, val: f64);
fn cache_clear(&mut self); }

Cache operations for EvalNamespaces.

Implement this trait if your Namespace type uses a cache.

Required methods

fn cache_create(&mut self, name: String, val: f64) -> Result<(), Error>

Creates a new cached entry. If an entry with the same name already exists, an AlreadyExists Error is returned.

fn cache_set(&mut self, name: String, val: f64)

Sets a cached entry. It doesn't matter whether or not a previous value existed with this name.

fn cache_clear(&mut self)

Clear all cached entries. Values will be recalculated and cached again the next time they are looked up.

Loading content...

Implementors

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

Loading content...