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

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

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 [&mut Dynamic]
) -> Result<Dynamic, Box<EvalAltResult, Global>>
[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?

Loading content...

Implementors

Loading content...