pub struct PluginRuntimeConfigBuilder { /* private fields */ }Expand description
Builder for PluginRuntimeConfig
Implementations§
Source§impl PluginRuntimeConfigBuilder
impl PluginRuntimeConfigBuilder
Sourcepub fn plugin_dir(self, dir: PathBuf) -> Self
pub fn plugin_dir(self, dir: PathBuf) -> Self
Set plugin directory
Sourcepub fn hot_reload(self, enabled: bool) -> Self
pub fn hot_reload(self, enabled: bool) -> Self
Set hot reload
Sourcepub fn memory_limit(self, limit: usize) -> Self
pub fn memory_limit(self, limit: usize) -> Self
Set memory limit
Sourcepub fn max_plugins(self, max: usize) -> Self
pub fn max_plugins(self, max: usize) -> Self
Set max plugins
Sourcepub fn fuel_metering(self, enabled: bool) -> Self
pub fn fuel_metering(self, enabled: bool) -> Self
Set fuel metering
Sourcepub fn fuel_limit(self, limit: u64) -> Self
pub fn fuel_limit(self, limit: u64) -> Self
Set fuel limit
Sourcepub fn enable_simd(self, enabled: bool) -> Self
pub fn enable_simd(self, enabled: bool) -> Self
Enable SIMD
Sourcepub fn enable_threads(self, enabled: bool) -> Self
pub fn enable_threads(self, enabled: bool) -> Self
Enable threads
Sourcepub fn cache_modules(self, enabled: bool) -> Self
pub fn cache_modules(self, enabled: bool) -> Self
Enable module caching
Sourcepub fn add_plugin(self, name: String, config: PluginConfig) -> Self
pub fn add_plugin(self, name: String, config: PluginConfig) -> Self
Add plugin config
Sourcepub fn build(self) -> PluginRuntimeConfig
pub fn build(self) -> PluginRuntimeConfig
Build the config
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginRuntimeConfigBuilder
impl RefUnwindSafe for PluginRuntimeConfigBuilder
impl Send for PluginRuntimeConfigBuilder
impl Sync for PluginRuntimeConfigBuilder
impl Unpin for PluginRuntimeConfigBuilder
impl UnsafeUnpin for PluginRuntimeConfigBuilder
impl UnwindSafe for PluginRuntimeConfigBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more