pub struct LocalProcess {
pub program: String,
pub allow_args: Vec<String>,
pub env: BTreeMap<String, String>,
pub max_output: usize,
pub calls: u64,
}Expand description
A sandboxed local process tool.
The allowlist is the program plus its permitted argument prefixes. The child
gets a scrubbed environment (only what the caller allows), no shell, and a
byte-bounded stdout. Anything else is rpc/tool-policy.
Fields§
§program: StringAbsolute program path or allowlisted name.
allow_args: Vec<String>Arguments the caller may pass (each must be an exact match or a prefix
when it ends with *).
env: BTreeMap<String, String>Environment variables the child inherits.
max_output: usizeMaximum output bytes.
calls: u64Calls served.
Implementations§
Trait Implementations§
Source§impl Debug for LocalProcess
impl Debug for LocalProcess
Source§impl Provider for LocalProcess
impl Provider for LocalProcess
Source§fn mutating(&self, _method: &str) -> bool
fn mutating(&self, _method: &str) -> bool
Whether
method mutates provider state (refused on read-only caps).Source§fn invoke(&mut self, _object: u64, call: &Call) -> Result<Response>
fn invoke(&mut self, _object: u64, call: &Call) -> Result<Response>
Invoke a method on
object.Source§fn has_method(&self, method: &str) -> bool
fn has_method(&self, method: &str) -> bool
Whether this provider answers
method.Source§fn on_drop(&mut self, _object: u64, _cap: CapId)
fn on_drop(&mut self, _object: u64, _cap: CapId)
Called when the last capability referencing
object is dropped.Source§fn take_drop_notifications(&mut self) -> Vec<(u64, CapId)>
fn take_drop_notifications(&mut self) -> Vec<(u64, CapId)>
Drain provider-side drop notifications recorded by
Provider::on_drop. Read moreAuto Trait Implementations§
impl Freeze for LocalProcess
impl RefUnwindSafe for LocalProcess
impl Send for LocalProcess
impl Sync for LocalProcess
impl Unpin for LocalProcess
impl UnsafeUnpin for LocalProcess
impl UnwindSafe for LocalProcess
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