pub trait Function: MaybeRefUnwindSafe + Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn signature(&self) -> Signature;
    fn execute(
        &self,
        context: &mut dyn FunctionContext,
        args: &mut dyn Iterator<Item = Value>
    ) -> Result<Option<Value>>;
}
Expand description

Something that provides a function implementation on the host for a wasm function.

Required Methods§

source

fn name(&self) -> &str

Returns the name of this function.

source

fn signature(&self) -> Signature

Returns the signature of this function.

source

fn execute( &self, context: &mut dyn FunctionContext, args: &mut dyn Iterator<Item = Value> ) -> Result<Option<Value>>

Execute this function with the given arguments.

Trait Implementations§

source§

impl PartialEq<dyn Function + 'static> for dyn Function

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Implementors§