pub struct ProcessSpec { /* private fields */ }Expand description
Complete specification for one bounded child-process invocation.
Implementations§
Source§impl ProcessSpec
impl ProcessSpec
Sourcepub fn new(
executable: DeclaredExecutable,
arguments: Vec<OsString>,
working_directory: WorkingDirectoryPolicy,
environment: EnvironmentPolicy,
limits: ProcessLimits,
) -> Self
pub fn new( executable: DeclaredExecutable, arguments: Vec<OsString>, working_directory: WorkingDirectoryPolicy, environment: EnvironmentPolicy, limits: ProcessLimits, ) -> Self
Construct a process specification with explicit cwd, environment, and resource limits. Standard input defaults to null; stdout and stderr default to bounded head-and-tail capture for source compatibility.
Sourcepub fn with_stdin_policy(self, policy: StdinPolicy) -> Self
pub fn with_stdin_policy(self, policy: StdinPolicy) -> Self
Select the child standard-input policy.
Sourcepub fn with_stdout_policy(self, policy: OutputStreamPolicy) -> Self
pub fn with_stdout_policy(self, policy: OutputStreamPolicy) -> Self
Select the child standard-output policy.
Sourcepub fn with_stderr_policy(self, policy: OutputStreamPolicy) -> Self
pub fn with_stderr_policy(self, policy: OutputStreamPolicy) -> Self
Select the child standard-error policy.
Sourcepub fn with_stdout_retention(self, retention: CaptureRetention) -> Self
pub fn with_stdout_retention(self, retention: CaptureRetention) -> Self
Select retention for captured standard output.
Sourcepub fn with_stderr_retention(self, retention: CaptureRetention) -> Self
pub fn with_stderr_retention(self, retention: CaptureRetention) -> Self
Select retention for captured standard error.
Sourcepub fn with_drain_grace(self, drain_grace: Duration) -> Self
pub fn with_drain_grace(self, drain_grace: Duration) -> Self
Override the bounded post-termination pipe-drain grace.
Sourcepub fn executable(&self) -> &DeclaredExecutable
pub fn executable(&self) -> &DeclaredExecutable
Return the declared executable.
Sourcepub fn arguments(&self) -> &[OsString]
pub fn arguments(&self) -> &[OsString]
Return the literal argv entries passed to the executable.
Sourcepub fn working_directory(&self) -> &WorkingDirectoryPolicy
pub fn working_directory(&self) -> &WorkingDirectoryPolicy
Return the working-directory policy.
Sourcepub fn environment(&self) -> &EnvironmentPolicy
pub fn environment(&self) -> &EnvironmentPolicy
Return the environment policy.
Sourcepub fn limits(&self) -> ProcessLimits
pub fn limits(&self) -> ProcessLimits
Return the process resource limits.
Sourcepub fn stdin_policy(&self) -> StdinPolicy
pub fn stdin_policy(&self) -> StdinPolicy
Return the child standard-input policy.
Sourcepub fn stdout_policy(&self) -> OutputStreamPolicy
pub fn stdout_policy(&self) -> OutputStreamPolicy
Return the child standard-output policy.
Sourcepub fn stderr_policy(&self) -> OutputStreamPolicy
pub fn stderr_policy(&self) -> OutputStreamPolicy
Return the child standard-error policy.
Sourcepub fn stdout_retention(&self) -> CaptureRetention
pub fn stdout_retention(&self) -> CaptureRetention
Return standard-output capture retention.
Sourcepub fn stderr_retention(&self) -> CaptureRetention
pub fn stderr_retention(&self) -> CaptureRetention
Return standard-error capture retention.
Sourcepub fn drain_grace(&self) -> Duration
pub fn drain_grace(&self) -> Duration
Return the bounded post-termination pipe-drain grace.