pub struct MemoryProcessRunner { /* private fields */ }Expand description
Records process invocations and returns pre-configured outputs.
Programs not in the allowlist are rejected with AppError::Permission
before the run method returns — exactly as the contract requires.
Implementations§
Source§impl MemoryProcessRunner
impl MemoryProcessRunner
pub fn new(allowlist: ProcessAllowlist, output: ProcessOutput) -> Self
Sourcepub fn success(allowlist: ProcessAllowlist) -> Self
pub fn success(allowlist: ProcessAllowlist) -> Self
Construct a runner that returns a successful exit code (0) and empty output.
Trait Implementations§
Source§impl Debug for MemoryProcessRunner
impl Debug for MemoryProcessRunner
Source§impl ProcessRunner for MemoryProcessRunner
impl ProcessRunner for MemoryProcessRunner
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 MemoryProcessRunner
impl RefUnwindSafe for MemoryProcessRunner
impl Send for MemoryProcessRunner
impl Sync for MemoryProcessRunner
impl Unpin for MemoryProcessRunner
impl UnsafeUnpin for MemoryProcessRunner
impl UnwindSafe for MemoryProcessRunner
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