Function

Trait Function 

Source
pub trait Function: Send + Sync {
    type Output: Send + Sync;

    // Required methods
    fn name(&self) -> String;
    fn inputs(&self) -> Vec<Arg>;
    fn output(&self) -> Option<Arg>;
    fn call(&self, args: &[Variable]) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn name(&self) -> String

Source

fn inputs(&self) -> Vec<Arg>

Source

fn output(&self) -> Option<Arg>

Source

fn call(&self, args: &[Variable]) -> Self::Output

Trait Implementations§

Source§

impl<O: Send + Sync> Debug for dyn Function<Output = O>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<O: Send + Sync> Display for dyn Function<Output = O>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<O: Send + Sync> PartialEq for dyn Function<Output = O>

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<O: Send + Sync> Eq for dyn Function<Output = O>

Implementors§