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

pub trait PluginFunction {
    pub fn call(
        &self,
        context: NativeCallContext<'_, '_, '_, '_>,
        args: &mut FnCallArgs<'_>
    ) -> Result<Dynamic, Box<EvalAltResult>>;
pub fn is_method_call(&self) -> bool;
pub fn is_variadic(&self) -> bool;
pub 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<F, A> Future for Box<F, A> where
    A: Allocator + 'static,
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    A: Allocator,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;
;
pub fn input_names(&self) -> Box<[&'static str]>

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<F, A> Future for Box<F, A> where
    A: Allocator + 'static,
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    A: Allocator,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;
;
pub 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<F, A> Future for Box<F, A> where
    A: Allocator + 'static,
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    A: Allocator,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;
;
pub fn return_type(&self) -> &'static str; }

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

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

Call the plugin function with the arguments provided.

pub fn is_method_call(&self) -> bool[src]

Is this plugin function a method?

pub fn is_variadic(&self) -> bool[src]

Is this plugin function variadic?

pub 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<F, A> Future for Box<F, A> where
    A: Allocator + 'static,
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    A: Allocator,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;
[src]

Convert a plugin function into a boxed trait object.

pub fn input_names(&self) -> Box<[&'static str]>

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<F, A> Future for Box<F, A> where
    A: Allocator + 'static,
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    A: Allocator,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;
[src]

Return a boxed slice of the names of the function's parameters.

pub 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<F, A> Future for Box<F, A> where
    A: Allocator + 'static,
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    A: Allocator,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;
[src]

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

pub fn return_type(&self) -> &'static str[src]

Return a string slice of the function's return type.

Loading content...

Implementors

Loading content...