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:
Pluginfor the plugin, bothPlugin::buildandPlugin::finishmethods need to be dispatched to the underlyingScriptingPluginstruct- [
AsMut<ScriptingPlugin<Self>] for the plugin struct
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn build_runtime() -> Self::R
fn build_runtime() -> Self::R
Build the runtime
Sourcefn context_loader() -> ContextLoadFn<Self>
fn context_loader() -> ContextLoadFn<Self>
Returns the context loader function for the plugin
Sourcefn context_reloader() -> ContextReloadFn<Self>
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.