[][src]Struct arithmetic_eval::InterpretedFn

pub struct InterpretedFn<'a, T: Grammar> { /* fields omitted */ }

Function defined within the interpreter.

Implementations

impl<'a, T: Grammar> InterpretedFn<'a, T>[src]

pub fn arg_count(&self) -> LvalueLen[src]

Returns the number of arguments for this function.

pub fn captures(&self) -> HashMap<&'a str, &Value<'a, T>>[src]

Returns values captured by this function.

impl<'a, T> InterpretedFn<'a, T> where
    T: Grammar,
    T::Lit: Num + Neg<Output = T::Lit> + Pow<T::Lit, Output = T::Lit>, 
[src]

pub fn evaluate(
    &self,
    args: Vec<SpannedValue<'a, T>>,
    ctx: &mut CallContext<'_, 'a>
) -> EvalResult<'a, T>
[src]

Evaluates this function with the provided arguments and the execution context.

Trait Implementations

impl<'a, T: Debug + Grammar> Debug for InterpretedFn<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for InterpretedFn<'a, T>

impl<'a, T> !Send for InterpretedFn<'a, T>

impl<'a, T> !Sync for InterpretedFn<'a, T>

impl<'a, T> Unpin for InterpretedFn<'a, T> where
    <T as Grammar>::Lit: Unpin

impl<'a, T> !UnwindSafe for InterpretedFn<'a, T>

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.