pub struct PluginConfig {
pub plugin_dir: PathBuf,
pub config_dir: PathBuf,
pub enabled: bool,
pub default_timeout_ms: u64,
pub max_memory_mb: usize,
pub allow_network: bool,
pub disabled_plugins: HashSet<String>,
}Expand description
Global plugin system configuration.
Fields§
§plugin_dir: PathBufDirectory where plugins are stored.
config_dir: PathBufDirectory for plugin configuration files.
enabled: boolWhether to enable the plugin system.
default_timeout_ms: u64Default timeout for plugin operations in milliseconds.
max_memory_mb: usizeMaximum memory per plugin in MB (0 = unlimited).
allow_network: boolWhether to allow plugins to access the network.
disabled_plugins: HashSet<String>List of disabled plugin names.
Implementations§
Source§impl PluginConfig
impl PluginConfig
Sourcepub fn with_plugin_dir(self, dir: PathBuf) -> Self
pub fn with_plugin_dir(self, dir: PathBuf) -> Self
Create a new config with a custom plugin directory.
Sourcepub fn with_timeout(self, timeout_ms: u64) -> Self
pub fn with_timeout(self, timeout_ms: u64) -> Self
Set the default timeout.
Sourcepub fn disable_plugin(self, name: impl Into<String>) -> Self
pub fn disable_plugin(self, name: impl Into<String>) -> Self
Disable a specific plugin.
Sourcepub fn is_disabled(&self, name: &str) -> bool
pub fn is_disabled(&self, name: &str) -> bool
Check if a plugin is disabled.
Trait Implementations§
Source§impl Clone for PluginConfig
impl Clone for PluginConfig
Source§fn clone(&self) -> PluginConfig
fn clone(&self) -> PluginConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PluginConfig
impl Debug for PluginConfig
Auto Trait Implementations§
impl Freeze for PluginConfig
impl RefUnwindSafe for PluginConfig
impl Send for PluginConfig
impl Sync for PluginConfig
impl Unpin for PluginConfig
impl UnsafeUnpin for PluginConfig
impl UnwindSafe for PluginConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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