lang_interpreter::interpreter::data::function::native

Trait NativeFunctionAdapter

Source
pub trait NativeFunctionAdapter: Sealed {
    // Required methods
    fn lang_call(
        &self,
        interpreter: &mut Interpreter,
        this_object: OptionLangObjectRef,
        args: Vec<DataObjectRef>,
    ) -> Result<OptionDataObjectRef>;
    fn lang_parameter_count(&self) -> usize;
    fn is_method(&self) -> bool;
}

Required Methods§

Source

fn lang_call( &self, interpreter: &mut Interpreter, this_object: OptionLangObjectRef, args: Vec<DataObjectRef>, ) -> Result<OptionDataObjectRef>

Source

fn lang_parameter_count(&self) -> usize

Source

fn is_method(&self) -> bool

Trait Implementations§

Source§

impl Debug for dyn NativeFunctionAdapter

Source§

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

Formats the value using the given formatter. Read more

Implementations on Foreign Types§

Source§

impl<Args: FromLangArgs> NativeFunctionAdapter for Box<dyn Fn(&mut Interpreter, Args) -> Result<OptionDataObjectRef>>

Implementors§