Struct fasteval2::evalns::CachedCallbackNamespace
source · [−]pub struct CachedCallbackNamespace<'a> { /* private fields */ }Expand description
CachedCallbackNamespace is useful when your variable/function lookups are expensive.
Each variable+args combo will only be looked up once, and then it will be cached and re-used for subsequent lookups.
Implementations
Trait Implementations
sourceimpl Cached for CachedCallbackNamespace<'_>
impl Cached for CachedCallbackNamespace<'_>
sourcefn cache_create(&mut self, name: String, val: f64) -> Result<(), Error>
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. Read more
sourcefn cache_set(&mut self, name: String, val: f64)
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. Read more
sourcefn cache_clear(&mut self)
fn cache_clear(&mut self)
Clear all cached entries. Values will be recalculated and cached again the next time they are looked up. Read more
Auto Trait Implementations
impl<'a> !RefUnwindSafe for CachedCallbackNamespace<'a>
impl<'a> !Send for CachedCallbackNamespace<'a>
impl<'a> !Sync for CachedCallbackNamespace<'a>
impl<'a> Unpin for CachedCallbackNamespace<'a>
impl<'a> !UnwindSafe for CachedCallbackNamespace<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more