pub struct StdlibConfig {
pub safety: SafetyConfig,
pub process: ModuleConfig,
pub fs: ModuleConfig,
pub path: ModuleConfig,
pub env: ModuleConfig,
pub format: ModuleConfig,
pub net: ModuleConfig,
pub time: ModuleConfig,
pub metrics: ModuleConfig,
}Expand description
Configuration for the stdlib registry.
Fields§
§safety: SafetyConfigSafety configuration.
process: ModuleConfigProcess module configuration.
fs: ModuleConfigFilesystem module configuration.
path: ModuleConfigPath module configuration.
env: ModuleConfigEnvironment module configuration.
format: ModuleConfigFormat module configuration.
net: ModuleConfigNetwork module configuration.
time: ModuleConfigTime module configuration.
metrics: ModuleConfigMetrics module configuration.
Implementations§
Source§impl StdlibConfig
impl StdlibConfig
Sourcepub fn permissive() -> Self
pub fn permissive() -> Self
Create a permissive configuration (for trusted code only).
Sourcepub fn with_safety(self, safety: SafetyConfig) -> Self
pub fn with_safety(self, safety: SafetyConfig) -> Self
Set safety configuration.
Sourcepub fn with_process(self, config: ModuleConfig) -> Self
pub fn with_process(self, config: ModuleConfig) -> Self
Configure the process module.
Sourcepub fn with_fs(self, config: ModuleConfig) -> Self
pub fn with_fs(self, config: ModuleConfig) -> Self
Configure the filesystem module.
Sourcepub fn with_path(self, config: ModuleConfig) -> Self
pub fn with_path(self, config: ModuleConfig) -> Self
Configure the path module.
Sourcepub fn with_env(self, config: ModuleConfig) -> Self
pub fn with_env(self, config: ModuleConfig) -> Self
Configure the environment module.
Sourcepub fn with_format(self, config: ModuleConfig) -> Self
pub fn with_format(self, config: ModuleConfig) -> Self
Configure the format module.
Sourcepub fn with_net(self, config: ModuleConfig) -> Self
pub fn with_net(self, config: ModuleConfig) -> Self
Configure the network module.
Sourcepub fn with_time(self, config: ModuleConfig) -> Self
pub fn with_time(self, config: ModuleConfig) -> Self
Configure the time module.
Sourcepub fn with_metrics(self, config: ModuleConfig) -> Self
pub fn with_metrics(self, config: ModuleConfig) -> Self
Configure the metrics module.
Sourcepub fn enable_all(self) -> Self
pub fn enable_all(self) -> Self
Enable all modules.
Sourcepub fn disable_all(self) -> Self
pub fn disable_all(self) -> Self
Disable all modules.
Trait Implementations§
Source§impl Clone for StdlibConfig
impl Clone for StdlibConfig
Source§fn clone(&self) -> StdlibConfig
fn clone(&self) -> StdlibConfig
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 StdlibConfig
impl Debug for StdlibConfig
Auto Trait Implementations§
impl Freeze for StdlibConfig
impl RefUnwindSafe for StdlibConfig
impl Send for StdlibConfig
impl Sync for StdlibConfig
impl Unpin for StdlibConfig
impl UnwindSafe for StdlibConfig
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