[][src]Trait rhai::plugin::PluginFunction

pub trait PluginFunction {
    fn call(
        &self,
        context: NativeCallContext<'_, '_, '_, '_>,
        args: &mut FnCallArgs<'_>
    ) -> Result<Dynamic, Box<EvalAltResult>>;
fn is_method_call(&self) -> bool;
fn is_variadic(&self) -> bool;
fn clone_boxed(&self) -> Box<dyn PluginFunction>

Notable traits for Box<W, Global>

impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<I, A> Iterator for Box<I, A> where
    A: AllocRef,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    A: AllocRef,
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;
;
fn input_types(&self) -> Box<[TypeId]>

Notable traits for Box<W, Global>

impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<I, A> Iterator for Box<I, A> where
    A: AllocRef,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    A: AllocRef,
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;
; }

Trait implemented by a plugin function. This trait should not be used directly.

Use the #[export_module] and #[export_fn] procedural attributes instead.

Required methods

fn call(
    &self,
    context: NativeCallContext<'_, '_, '_, '_>,
    args: &mut FnCallArgs<'_>
) -> Result<Dynamic, Box<EvalAltResult>>

Call the plugin function with the arguments provided.

fn is_method_call(&self) -> bool

Is this plugin function a method?

fn is_variadic(&self) -> bool

Is this plugin function variadic?

fn clone_boxed(&self) -> Box<dyn PluginFunction>

Notable traits for Box<W, Global>

impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<I, A> Iterator for Box<I, A> where
    A: AllocRef,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    A: AllocRef,
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;

Convert a plugin function into a boxed trait object.

fn input_types(&self) -> Box<[TypeId]>

Notable traits for Box<W, Global>

impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<I, A> Iterator for Box<I, A> where
    A: AllocRef,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    A: AllocRef,
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;

Return a boxed slice of type ID's of the function's parameters.

Loading content...

Implementors

Loading content...