pub struct Commands { /* private fields */ }Expand description
A sandbox’s commands: Sandbox::commands.
Implementations§
Source§impl Commands
impl Commands
Sourcepub fn run(&self, command: impl Into<CommandLine>) -> CommandBuilder<Foreground>
pub fn run(&self, command: impl Into<CommandLine>) -> CommandBuilder<Foreground>
Runs command to its exit: a script (&str), which the sandbox’s
shell runs (/bin/bash -lc, or /bin/sh -c in an image without
bash), or an argv (["ls", "-l"]), which runs as it is. Dropped
before it exits, it’s killed.
Sourcepub fn spawn(
&self,
command: impl Into<CommandLine>,
) -> CommandBuilder<Background>
pub fn spawn( &self, command: impl Into<CommandLine>, ) -> CommandBuilder<Background>
Starts command, as Commands::run takes it, and gives a handle
to it at once.
Auto Trait Implementations§
impl !RefUnwindSafe for Commands
impl !UnwindSafe for Commands
impl Forget for Commands
impl Freeze for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnsafeUnpin for Commands
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