pub struct SandboxChild {
pub stdin: Option<ChildStdin>,
pub stdout: Option<ChildStdout>,
pub stderr: Option<ChildStderr>,
/* private fields */
}Expand description
A spawned sandboxed process.
This is intentionally a small child-process wrapper rather than a stream
abstraction. It exists so macOS sandbox profiles can remain on disk until
sandbox-exec has finished with them; callers still choose whether to
consume pipes, wait, or collect output.
Fields§
§stdin: Option<ChildStdin>§stdout: Option<ChildStdout>§stderr: Option<ChildStderr>Implementations§
Source§impl SandboxChild
impl SandboxChild
pub fn id(&self) -> Option<u32>
pub fn take_stdin(&mut self) -> Option<ChildStdin>
pub fn take_stdout(&mut self) -> Option<ChildStdout>
pub fn take_stderr(&mut self) -> Option<ChildStderr>
pub async fn kill(&mut self) -> Result<()>
pub fn start_kill(&mut self) -> Result<()>
pub async fn wait(&mut self) -> Result<ExitStatus>
pub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
pub async fn wait_with_output(self) -> Result<Output>
Trait Implementations§
Source§impl Drop for SandboxChild
impl Drop for SandboxChild
Auto Trait Implementations§
impl !RefUnwindSafe for SandboxChild
impl !UnwindSafe for SandboxChild
impl Freeze for SandboxChild
impl Send for SandboxChild
impl Sync for SandboxChild
impl Unpin for SandboxChild
impl UnsafeUnpin for SandboxChild
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