pub struct CommandExecParams {Show 14 fields
pub command: Vec<String>,
pub process_id: Option<String>,
pub tty: bool,
pub stream_stdin: bool,
pub stream_stdout_stderr: bool,
pub output_bytes_cap: Option<usize>,
pub disable_output_cap: bool,
pub disable_timeout: bool,
pub timeout_ms: Option<i64>,
pub cwd: Option<PathBuf>,
pub env: Option<HashMap<String, Option<String>>>,
pub size: Option<CommandExecTerminalSize>,
pub sandbox_policy: Option<SandboxPolicy>,
pub permission_profile: Option<String>,
}Expand description
Run a standalone command (argv vector) in the server sandbox without creating a thread or turn.
The final command/exec response is deferred until the process exits and is
sent only after all command/exec/outputDelta notifications for that
connection have been emitted.
Fields§
§command: Vec<String>Command argv vector. Empty arrays are rejected.
process_id: Option<String>Optional client-supplied, connection-scoped process id.
Required for tty, streamStdin, streamStdoutStderr, and follow-up
command/exec/write, command/exec/resize, and
command/exec/terminate calls. When omitted, buffered execution gets an
internal id that is not exposed to the client.
tty: boolEnable PTY mode.
This implies streamStdin and streamStdoutStderr.
stream_stdin: boolAllow follow-up command/exec/write requests to write stdin bytes.
Requires a client-supplied processId.
stream_stdout_stderr: boolStream stdout/stderr via command/exec/outputDelta notifications.
Streamed bytes are not duplicated into the final response and require a
client-supplied processId.
output_bytes_cap: Option<usize>Optional per-stream stdout/stderr capture cap in bytes.
When omitted, the server default applies. Cannot be combined with
disableOutputCap.
disable_output_cap: boolDisable stdout/stderr capture truncation for this request.
Cannot be combined with outputBytesCap.
disable_timeout: boolDisable the timeout entirely for this request.
Cannot be combined with timeoutMs.
timeout_ms: Option<i64>Optional timeout in milliseconds.
When omitted, the server default applies. Cannot be combined with
disableTimeout.
cwd: Option<PathBuf>Optional working directory. Defaults to the server cwd.
env: Option<HashMap<String, Option<String>>>Optional environment overrides merged into the server-computed environment.
Matching names override inherited values. Set a key to null to unset
an inherited variable.
size: Option<CommandExecTerminalSize>Optional initial PTY size in character cells. Only valid when tty is
true.
sandbox_policy: Option<SandboxPolicy>Optional sandbox policy for this command.
Uses the same shape as thread/turn execution sandbox configuration and
defaults to the user’s configured policy when omitted. Cannot be
combined with permissionProfile.
permission_profile: Option<String>Optional active permissions profile id for this command.
Defaults to the user’s configured permissions when omitted. Cannot be
combined with sandboxPolicy.
Trait Implementations§
Source§impl Clone for CommandExecParams
impl Clone for CommandExecParams
Source§fn clone(&self) -> CommandExecParams
fn clone(&self) -> CommandExecParams
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 CommandExecParams
impl Debug for CommandExecParams
Source§impl<'de> Deserialize<'de> for CommandExecParams
impl<'de> Deserialize<'de> for CommandExecParams
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 ExperimentalApi for CommandExecParams
impl ExperimentalApi for CommandExecParams
Source§fn experimental_reason(&self) -> Option<&'static str>
fn experimental_reason(&self) -> Option<&'static str>
None when the value is entirely stable.Source§impl JsonSchema for CommandExecParams
impl JsonSchema for CommandExecParams
Source§fn schema_name() -> String
fn schema_name() -> String
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 is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for CommandExecParams
impl PartialEq for CommandExecParams
Source§impl Serialize for CommandExecParams
impl Serialize for CommandExecParams
impl StructuralPartialEq for CommandExecParams
Source§impl TS for CommandExecParams
impl TS for CommandExecParams
Source§type WithoutGenerics = CommandExecParams
type WithoutGenerics = CommandExecParams
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or ().
The only requirement for these dummy types is that EXPORT_TO must be None. Read moreSource§type OptionInnerType = CommandExecParams
type OptionInnerType = CommandExecParams
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete() -> String
fn decl_concrete() -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl() -> String
fn decl() -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline() -> String
fn inline() -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened() -> String
fn inline_flattened() -> String
This function will panic if the type cannot be flattened.
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported.The returned path does not include the base directory from
TS_RS_EXPORT_DIR. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies() -> Vec<Dependency>where
Self: 'static,
fn dependencies() -> Vec<Dependency>where
Self: 'static,
Source§fn export() -> Result<(), ExportError>where
Self: 'static,
fn export() -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all() -> Result<(), ExportError>where
Self: 'static,
fn export_all() -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read moreSource§fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read moreSource§fn export_to_string() -> Result<String, ExportError>where
Self: 'static,
fn export_to_string() -> Result<String, ExportError>where
Self: 'static,
Auto Trait Implementations§
impl Freeze for CommandExecParams
impl RefUnwindSafe for CommandExecParams
impl Send for CommandExecParams
impl Sync for CommandExecParams
impl Unpin for CommandExecParams
impl UnsafeUnpin for CommandExecParams
impl UnwindSafe for CommandExecParams
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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