[−][src]Enum arithmetic_eval::Function
Function definition. Functions can be either native (defined in the Rust code) or defined in the interpreter.
Variants
Native function.
Interpreted(Rc<InterpretedFn<'a, T>>)
Interpreted function.
Implementations
impl<'_, T: Grammar> Function<'_, T>
[src]
pub fn is_same_function(&self, other: &Self) -> bool
[src]
Checks if the provided function is the same as this one.
impl<'a, T> Function<'a, T> where
T: Grammar,
T::Lit: Num + Neg<Output = T::Lit> + Pow<T::Lit, Output = T::Lit>,
[src]
T: Grammar,
T::Lit: Num + Neg<Output = T::Lit> + Pow<T::Lit, Output = T::Lit>,
pub fn evaluate(
&self,
args: Vec<SpannedValue<'a, T>>,
ctx: &mut CallContext<'_, 'a>
) -> EvalResult<'a, T>
[src]
&self,
args: Vec<SpannedValue<'a, T>>,
ctx: &mut CallContext<'_, 'a>
) -> EvalResult<'a, T>
Evaluates the function on the specified arguments.
Trait Implementations
impl<'_, T: Grammar> Clone for Function<'_, T>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a, T: Debug> Debug for Function<'a, T> where
T: Grammar,
[src]
T: Grammar,
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for Function<'a, T>
impl<'a, T> !Send for Function<'a, T>
impl<'a, T> !Sync for Function<'a, T>
impl<'a, T> Unpin for Function<'a, T>
impl<'a, T> !UnwindSafe for Function<'a, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,