IntoScriptPluginParams

Trait IntoScriptPluginParams 

Source
pub trait IntoScriptPluginParams: 'static + GetPluginThreadConfig<Self> {
    type C: Context;
    type R: Runtime;

    const LANGUAGE: Language;

    // Required methods
    fn build_runtime() -> Self::R;
    fn handler() -> HandlerFn<Self>;
    fn context_loader() -> ContextLoadFn<Self>;
    fn context_reloader() -> ContextReloadFn<Self>;
}
Expand description

Types which act like scripting plugins, by selecting a context and runtime Each individual combination of context and runtime has specific infrastructure built for it and does not interact with other scripting plugins

When implementing a new scripting plugin, also ensure the following implementations exist:

Required Associated Constants§

Source

const LANGUAGE: Language

The language of the scripts

Required Associated Types§

Source

type C: Context

The context type used for the scripts

Source

type R: Runtime

The runtime type used for the scripts

Required Methods§

Source

fn build_runtime() -> Self::R

Build the runtime

Source

fn handler() -> HandlerFn<Self>

Returns the handler function for the plugin

Source

fn context_loader() -> ContextLoadFn<Self>

Returns the context loader function for the plugin

Source

fn context_reloader() -> ContextReloadFn<Self>

Returns the context reloader function for the plugin

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§