pub struct LocalConfig {
pub enable_os_sandbox: bool,
pub allowed_read_paths: Vec<PathBuf>,
pub allowed_write_paths: Vec<PathBuf>,
pub allow_network: bool,
pub default_timeout_secs: u64,
pub max_output_bytes: usize,
}Expand description
本地沙箱配置
Fields§
§enable_os_sandbox: bool是否启用 OS 级沙箱(sandbox-exec / bubblewrap)
allowed_read_paths: Vec<PathBuf>允许访问的路径(只读)
allowed_write_paths: Vec<PathBuf>允许访问的路径(读写)
allow_network: bool是否允许网络访问
default_timeout_secs: u64默认超时(秒)
max_output_bytes: usize最大输出大小(字节)
Trait Implementations§
Source§impl Clone for LocalConfig
impl Clone for LocalConfig
Source§fn clone(&self) -> LocalConfig
fn clone(&self) -> LocalConfig
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 LocalConfig
impl Debug for LocalConfig
Source§impl Default for LocalConfig
impl Default for LocalConfig
Source§impl<'de> Deserialize<'de> for LocalConfig
impl<'de> Deserialize<'de> for LocalConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LocalConfig
impl RefUnwindSafe for LocalConfig
impl Send for LocalConfig
impl Sync for LocalConfig
impl Unpin for LocalConfig
impl UnsafeUnpin for LocalConfig
impl UnwindSafe for LocalConfig
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