pub struct StdProcessRunner { /* private fields */ }Expand description
Runs allowlisted programs with tokio::process.
The allowlist is a field, not a parameter: the runner is constructed with the set of programs a product permits, and that set is fixed for the runner’s lifetime — the same “named options, not a free list” posture as the security profiles.
Implementations§
Source§impl StdProcessRunner
impl StdProcessRunner
pub fn new(allowlist: ProcessAllowlist) -> Self
pub fn allowlist(&self) -> &ProcessAllowlist
Trait Implementations§
Source§impl Clone for StdProcessRunner
impl Clone for StdProcessRunner
Source§fn clone(&self) -> StdProcessRunner
fn clone(&self) -> StdProcessRunner
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StdProcessRunner
impl Debug for StdProcessRunner
Source§impl ProcessRunner for StdProcessRunner
impl ProcessRunner for StdProcessRunner
Source§fn run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
program: &'life1 str,
args: &'life2 [String],
cwd: &'life3 Path,
) -> Pin<Box<dyn Future<Output = Result<ProcessOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
program: &'life1 str,
args: &'life2 [String],
cwd: &'life3 Path,
) -> Pin<Box<dyn Future<Output = Result<ProcessOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
program must be in the configured allowlist.
cwd is the working directory for the launched process.Auto Trait Implementations§
impl Freeze for StdProcessRunner
impl RefUnwindSafe for StdProcessRunner
impl Send for StdProcessRunner
impl Sync for StdProcessRunner
impl Unpin for StdProcessRunner
impl UnsafeUnpin for StdProcessRunner
impl UnwindSafe for StdProcessRunner
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