#[non_exhaustive]pub struct ProcessConfig {
pub timeout: Option<Duration>,
pub io: ProcessIo,
pub signal: SignalPolicy,
pub arg_redaction: ArgRedaction,
}Expand description
Configuration for subprocess execution behavior.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.timeout: Option<Duration>Overall timeout for the process. None means no timeout.
io: ProcessIoExplicit I/O strategy.
signal: SignalPolicySignal and process-tree termination policy.
arg_redaction: ArgRedactionRedaction policy for command-line arguments emitted in spawn logs.
Implementations§
Source§impl ProcessConfig
impl ProcessConfig
Sourcepub fn with_timeout(self, timeout: Option<Duration>) -> Self
pub fn with_timeout(self, timeout: Option<Duration>) -> Self
Set the process timeout.
Sourcepub fn with_signal_policy(self, signal: SignalPolicy) -> Self
pub fn with_signal_policy(self, signal: SignalPolicy) -> Self
Set the signal policy.
Sourcepub fn with_arg_redaction(self, arg_redaction: ArgRedaction) -> Self
pub fn with_arg_redaction(self, arg_redaction: ArgRedaction) -> Self
Set the command-line argument redaction policy used for spawn logs.
Sourcepub fn with_sensitive_arg_name(self, name: impl AsRef<str>) -> Self
pub fn with_sensitive_arg_name(self, name: impl AsRef<str>) -> Self
Add a custom secret-bearing command-line argument name for spawn-log redaction.
Sourcepub fn with_max_output_bytes(self, bytes: usize) -> Self
pub fn with_max_output_bytes(self, bytes: usize) -> Self
Set the maximum retained bytes for captured or observed output.
Sourcepub fn with_unbounded_output(self) -> Self
pub fn with_unbounded_output(self) -> Self
Disable output capture bounds for captured or observed output.
Sourcepub fn with_input(self, input: InputPolicy) -> Self
pub fn with_input(self, input: InputPolicy) -> Self
Set stdin for the configured I/O mode.
Trait Implementations§
Source§impl Clone for ProcessConfig
impl Clone for ProcessConfig
Source§fn clone(&self) -> ProcessConfig
fn clone(&self) -> ProcessConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProcessConfig
impl Debug for ProcessConfig
Auto Trait Implementations§
impl !RefUnwindSafe for ProcessConfig
impl !UnwindSafe for ProcessConfig
impl Freeze for ProcessConfig
impl Send for ProcessConfig
impl Sync for ProcessConfig
impl Unpin for ProcessConfig
impl UnsafeUnpin for ProcessConfig
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