pub struct ExecOptions {
pub cwd: Option<String>,
pub user: Option<String>,
pub env: BTreeMap<String, String>,
pub login: Option<bool>,
pub tty: bool,
pub width: Option<u16>,
pub height: Option<u16>,
pub timeout: Option<Duration>,
pub stdin: Stdin,
}Expand description
Per-call exec options. Unset fields fall back to the sandbox’s exec defaults.
Fields§
§cwd: Option<String>§user: Option<String>A guest user name, uid, or uid:gid.
env: BTreeMap<String, String>§login: Option<bool>Run through the user’s login shell.
tty: boolAllocate a pseudo-terminal (stdout and stderr are merged, as on any tty).
width: Option<u16>§height: Option<u16>§timeout: Option<Duration>Kill the command after this long. None (the default) means no limit.
stdin: StdinImplementations§
Source§impl ExecOptions
impl ExecOptions
pub fn cwd(self, c: impl Into<String>) -> Self
pub fn user(self, u: impl Into<String>) -> Self
pub fn env(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn login(self, l: bool) -> Self
pub fn tty(self, t: bool) -> Self
pub fn timeout(self, t: Duration) -> Self
pub fn stdin(self, s: Stdin) -> Self
Trait Implementations§
Source§impl Clone for ExecOptions
impl Clone for ExecOptions
Source§impl Debug for ExecOptions
impl Debug for ExecOptions
Auto Trait Implementations§
impl Freeze for ExecOptions
impl RefUnwindSafe for ExecOptions
impl Send for ExecOptions
impl Sync for ExecOptions
impl Unpin for ExecOptions
impl UnsafeUnpin for ExecOptions
impl UnwindSafe for ExecOptions
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