Trait fetish_lib::func_impl::FuncImpl[][src]

pub trait FuncImpl: HasFuncSignature {
    fn evaluate(
        &self,
        state: &mut InterpreterState<'_>,
        args: Vec<TermReference>
    ) -> (TermReference, NewlyEvaluatedTerms); }
Expand description

Trait for primitive function implementations.

Required methods

fn evaluate(
    &self,
    state: &mut InterpreterState<'_>,
    args: Vec<TermReference>
) -> (TermReference, NewlyEvaluatedTerms)
[src]

Expand description

Given a handle on the current InterpreterState (primarily useful if additional terms need to be evaluated / looked up) and the collection of TermReference arguments to apply this function implementation to, yields a TermReference to the result, along with a collection of any NewlyEvaluatedTerms which may have arisen as part of the implementation of this method. See func_impl.rs in the source for sample implementations.

Trait Implementations

impl Hash for dyn FuncImpl + '_[src]

fn hash<H: Hasher>(&self, state: &mut H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl PartialEq<dyn FuncImpl + '_> for dyn FuncImpl + '_[src]

fn eq(&self, other: &Self) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Eq for dyn FuncImpl + '_[src]

Implementors

impl FuncImpl for BinaryFuncImpl[src]

fn evaluate(
    &self,
    _state: &mut InterpreterState<'_>,
    args: Vec<TermReference>
) -> (TermReference, NewlyEvaluatedTerms)
[src]

impl FuncImpl for ComposeImpl[src]

fn evaluate(
    &self,
    state: &mut InterpreterState<'_>,
    args: Vec<TermReference>
) -> (TermReference, NewlyEvaluatedTerms)
[src]

impl FuncImpl for ConstImpl[src]

fn evaluate(
    &self,
    _state: &mut InterpreterState<'_>,
    args: Vec<TermReference>
) -> (TermReference, NewlyEvaluatedTerms)
[src]

impl FuncImpl for FillImpl[src]

fn evaluate(
    &self,
    state: &mut InterpreterState<'_>,
    args: Vec<TermReference>
) -> (TermReference, NewlyEvaluatedTerms)
[src]

impl FuncImpl for HeadImpl[src]

fn evaluate(
    &self,
    _state: &mut InterpreterState<'_>,
    args: Vec<TermReference>
) -> (TermReference, NewlyEvaluatedTerms)
[src]

impl FuncImpl for MapImpl[src]

fn evaluate(
    &self,
    state: &mut InterpreterState<'_>,
    args: Vec<TermReference>
) -> (TermReference, NewlyEvaluatedTerms)
[src]

impl FuncImpl for ReduceImpl[src]

fn evaluate(
    &self,
    state: &mut InterpreterState<'_>,
    args: Vec<TermReference>
) -> (TermReference, NewlyEvaluatedTerms)
[src]

impl FuncImpl for RotateImpl[src]

fn evaluate(
    &self,
    _state: &mut InterpreterState<'_>,
    args: Vec<TermReference>
) -> (TermReference, NewlyEvaluatedTerms)
[src]

impl FuncImpl for SetHeadImpl[src]

fn evaluate(
    &self,
    _state: &mut InterpreterState<'_>,
    args: Vec<TermReference>
) -> (TermReference, NewlyEvaluatedTerms)
[src]