pub struct OutputPolicy {
pub capture_stdout: bool,
pub capture_stderr: bool,
pub max_output_bytes: Option<usize>,
}Expand description
Output capture policy for pipe-backed modes.
Fields§
§capture_stdout: boolWhether stdout should be retained in ProcessResult.
capture_stderr: boolWhether stderr should be retained in ProcessResult.
max_output_bytes: Option<usize>Maximum retained bytes for each captured stream. None means unbounded.
Implementations§
Source§impl OutputPolicy
impl OutputPolicy
Sourcepub const fn observe_only() -> Self
pub const fn observe_only() -> Self
Do not retain stdout or stderr.
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 each captured output stream.
Sourcepub fn with_unbounded_output(self) -> Self
pub fn with_unbounded_output(self) -> Self
Disable output capture bounds.
Trait Implementations§
Source§impl Clone for OutputPolicy
impl Clone for OutputPolicy
Source§fn clone(&self) -> OutputPolicy
fn clone(&self) -> OutputPolicy
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 OutputPolicy
impl Debug for OutputPolicy
Source§impl Default for OutputPolicy
impl Default for OutputPolicy
impl Eq for OutputPolicy
Source§impl PartialEq for OutputPolicy
impl PartialEq for OutputPolicy
impl StructuralPartialEq for OutputPolicy
Auto Trait Implementations§
impl Freeze for OutputPolicy
impl RefUnwindSafe for OutputPolicy
impl Send for OutputPolicy
impl Sync for OutputPolicy
impl Unpin for OutputPolicy
impl UnsafeUnpin for OutputPolicy
impl UnwindSafe for OutputPolicy
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