#[non_exhaustive]pub struct ExecCommandParams {
pub command: String,
pub working_dir: Option<String>,
pub stdin: Option<String>,
pub timeout_secs: Option<i64>,
pub drain_timeout_secs: Option<i64>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.command: StringShell command to execute via sh -c (or $SHELL if set).
working_dir: Option<String>Working directory for the command. Set this instead of prepending cd to the command string. Validated against path traversal; does not sandbox the process.
stdin: Option<String>UTF-8 content to pipe into the process stdin (max STDIN_MAX_BYTES = 1 MB). When None, stdin is closed (null).
timeout_secs: Option<i64>Maximum execution time in seconds. When the command exceeds this limit, the
child process is killed and the response indicates timed_out: true.
A value of 0 or None means no timeout (unlimited execution).
drain_timeout_secs: Option<i64>Drain timeout in milliseconds after the child process exits. When the child
exits but a background subprocess holds pipes open, the drain collects
buffered output for this many milliseconds before returning
output_truncated: true. Default: 500ms when omitted or 0.
Positive values override the default. Negative values are rejected with
INVALID_PARAMS.
Implementations§
Trait Implementations§
Source§impl Clone for ExecCommandParams
impl Clone for ExecCommandParams
Source§fn clone(&self) -> ExecCommandParams
fn clone(&self) -> ExecCommandParams
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 ExecCommandParams
impl Debug for ExecCommandParams
Source§impl Default for ExecCommandParams
impl Default for ExecCommandParams
Source§fn default() -> ExecCommandParams
fn default() -> ExecCommandParams
Source§impl<'de> Deserialize<'de> for ExecCommandParams
impl<'de> Deserialize<'de> for ExecCommandParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ExecCommandParams
impl JsonSchema for ExecCommandParams
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ExecCommandParams
impl RefUnwindSafe for ExecCommandParams
impl Send for ExecCommandParams
impl Sync for ExecCommandParams
impl Unpin for ExecCommandParams
impl UnsafeUnpin for ExecCommandParams
impl UnwindSafe for ExecCommandParams
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more