[][src]Struct cel_interpreter::context::Context

pub struct Context {
    pub variables: HashMap<String, CelType>,
    pub functions: HashMap<String, Box<dyn Fn(Option<&CelType>, &[Expression], &Context) -> CelType>>,
}

Fields

variables: HashMap<String, CelType>functions: HashMap<String, Box<dyn Fn(Option<&CelType>, &[Expression], &Context) -> CelType>>

Implementations

impl Context[src]

pub fn add_variable(&mut self, name: String, value: CelType)[src]

pub fn add_function<F: 'static>(&mut self, name: String, value: F) where
    F: Fn(Option<&CelType>, &[Expression], &Context) -> CelType
[src]

Trait Implementations

impl Default for Context[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.