pub struct ExecOptions {
pub timeout: Option<Duration>,
pub open_stdin: bool,
pub pty: bool,
pub term: String,
pub cols: u32,
pub rows: u32,
pub idempotency_key: String,
pub retry_timeout: RetryBudget,
pub cwd: Option<String>,
pub background: bool,
}Expand description
Optional settings for Sailbox::exec and
Sailbox::exec_shell. Default runs a
plain foreground command (no pty, no stdin, no timeout) and retries transient
failures against a waking or migrating sailbox for 30 seconds (see
retry_timeout).
Fields§
§timeout: Option<Duration>Wall-clock limit before the server kills the command; None means no
limit. The wire is whole seconds, so a set sub-second timeout rounds up
to 1 second (it never collapses to the no-limit 0).
open_stdin: boolLeave the command’s stdin open for ExecProcess::write_stdin.
pty: boolAllocate a pseudo-terminal for the command.
term: StringTERM value for the pty (e.g. xterm-256color); ignored without pty.
cols: u32Initial pty width in columns; ignored without pty.
rows: u32Initial pty height in rows; ignored without pty.
idempotency_key: StringStable key that dedupes the launch so a reconnect reattaches to the same command. Empty mints a fresh one per call.
retry_timeout: RetryBudgetBudget for retrying transient RPC failures against a waking or migrating
sailbox: both while opening the stream and when ExecProcess::wait
falls back to WaitSailboxExec, which reattaches to the guest for the
result.
cwd: Option<String>Working directory to run a shell command in. Only valid with
Sailbox::exec_shell.
background: boolDetach a shell command so it keeps running and the call returns
immediately; output is discarded. Only valid with
Sailbox::exec_shell, and incompatible with
open_stdin and pty.
Trait Implementations§
Source§impl Clone for ExecOptions
impl Clone for ExecOptions
Source§fn clone(&self) -> ExecOptions
fn clone(&self) -> ExecOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecOptions
impl Debug for ExecOptions
Source§impl Default for ExecOptions
impl Default for ExecOptions
Source§fn default() -> ExecOptions
fn default() -> 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request