pub struct ModuleConfig {
pub enabled: bool,
pub timeout: Option<Duration>,
pub options: HashMap<String, String>,
}Expand description
Configuration for a specific module.
Fields§
§enabled: boolWhether the module is enabled.
timeout: Option<Duration>Default timeout for operations.
options: HashMap<String, String>Custom configuration options.
Implementations§
Source§impl ModuleConfig
impl ModuleConfig
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Set enabled state.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set timeout.
Sourcepub fn no_timeout(self) -> Self
pub fn no_timeout(self) -> Self
Remove timeout limit.
Trait Implementations§
Source§impl Clone for ModuleConfig
impl Clone for ModuleConfig
Source§fn clone(&self) -> ModuleConfig
fn clone(&self) -> ModuleConfig
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 ModuleConfig
impl Debug for ModuleConfig
Auto Trait Implementations§
impl Freeze for ModuleConfig
impl RefUnwindSafe for ModuleConfig
impl Send for ModuleConfig
impl Sync for ModuleConfig
impl Unpin for ModuleConfig
impl UnwindSafe for ModuleConfig
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