pub struct SandboxConfig {
pub enabled: bool,
pub profile: SandboxProfile,
pub allow_read: Vec<PathBuf>,
pub allow_write: Vec<PathBuf>,
pub strict: bool,
pub backend: String,
pub denied_domains: Vec<String>,
pub fail_if_unavailable: bool,
}Expand description
OS-level subprocess sandbox configuration ([tools.sandbox] TOML section).
Fields§
§enabled: boolEnable OS-level sandbox. Default: false.
profile: SandboxProfileEnforcement profile controlling the baseline restrictions.
allow_read: Vec<PathBuf>Additional paths granted read access.
allow_write: Vec<PathBuf>Additional paths granted write access.
strict: boolWhen true, sandbox initialization failure aborts startup (fail-closed). Default: true.
backend: StringOS backend hint: "auto" / "seatbelt" / "landlock-bwrap" / "noop".
denied_domains: Vec<String>Hostnames denied network egress from sandboxed subprocesses.
When true, failure to activate an effective OS sandbox aborts startup.
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
Source§impl Default for SandboxConfig
impl Default for SandboxConfig
Source§fn default() -> SandboxConfig
fn default() -> SandboxConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SandboxConfig
impl<'de> Deserialize<'de> for SandboxConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SandboxConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SandboxConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SandboxConfig
impl Serialize for SandboxConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SandboxConfig
impl RefUnwindSafe for SandboxConfig
impl Send for SandboxConfig
impl Sync for SandboxConfig
impl Unpin for SandboxConfig
impl UnsafeUnpin 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