pub struct SandboxConfig {
pub level: SandboxLevel,
pub max_memory_mb: u64,
pub max_cpu_seconds: u64,
pub max_file_descriptors: u64,
pub allowed_paths: Vec<PathBuf>,
pub readonly_paths: Vec<PathBuf>,
pub env_allowlist: Vec<String>,
pub network_allowed: bool,
pub work_dir: Option<PathBuf>,
}Expand description
Sandbox configuration.
Fields§
§level: SandboxLevelSecurity level.
max_memory_mb: u64Maximum memory in MB.
max_cpu_seconds: u64Maximum CPU time in seconds.
max_file_descriptors: u64Maximum file descriptors.
allowed_paths: Vec<PathBuf>Allowed paths (read-write).
readonly_paths: Vec<PathBuf>Read-only paths.
env_allowlist: Vec<String>Environment variable allowlist.
network_allowed: boolWhether network access is allowed.
work_dir: Option<PathBuf>Working directory.
Trait Implementations§
Source§impl Clone for SandboxConfig
impl Clone for SandboxConfig
Source§fn clone(&self) -> SandboxConfig
fn clone(&self) -> SandboxConfig
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 SandboxConfig
impl Debug for SandboxConfig
Auto Trait Implementations§
impl Freeze for SandboxConfig
impl RefUnwindSafe for SandboxConfig
impl Send for SandboxConfig
impl Sync for SandboxConfig
impl Unpin for SandboxConfig
impl UnwindSafe for SandboxConfig
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