pub trait ConfigureScriptPlugin {
type P: IntoScriptPluginParams;
// Required methods
fn add_context_initializer(
self,
initializer: ContextInitializer<Self::P>,
) -> Self;
fn add_context_pre_handling_initializer(
self,
initializer: ContextPreHandlingInitializer<Self::P>,
) -> Self;
fn add_runtime_initializer(
self,
initializer: RuntimeInitializer<Self::P>,
) -> Self;
fn enable_context_sharing(self);
}
Expand description
Utility trait for configuring all scripting plugins.
Required Associated Types§
Required Methods§
fn add_context_initializer( self, initializer: ContextInitializer<Self::P>, ) -> Self
fn add_context_pre_handling_initializer( self, initializer: ContextPreHandlingInitializer<Self::P>, ) -> Self
fn add_runtime_initializer( self, initializer: RuntimeInitializer<Self::P>, ) -> Self
Sourcefn enable_context_sharing(self)
fn enable_context_sharing(self)
Switch the context assigning strategy to a global context assigner.
This means that all scripts will share the same context. This is useful for when you want to share data between scripts easilly. Be careful however as this also means that scripts can interfere with each other in unexpected ways!.
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.