pub struct CaptureAll { /* private fields */ }Expand description
Builder for capturing both stdout and stderr from a command.
Implementations§
Source§impl CaptureAll
impl CaptureAll
Sourcepub fn accept_nonzero_exit(self) -> Self
pub fn accept_nonzero_exit(self) -> Self
Accept non-zero exit status instead of treating it as an error.
Sourcepub fn stdout_null(self) -> CaptureSingle<Stderr>
pub fn stdout_null(self) -> CaptureSingle<Stderr>
Stop capturing stdout (null), transitioning to CaptureSingle<Stderr>.
Sourcepub fn stdout_inherit(self) -> CaptureSingle<Stderr>
pub fn stdout_inherit(self) -> CaptureSingle<Stderr>
Stop capturing stdout (inherit), transitioning to CaptureSingle<Stderr>.
Sourcepub fn stderr_null(self) -> CaptureSingle<Stdout>
pub fn stderr_null(self) -> CaptureSingle<Stdout>
Stop capturing stderr (null), transitioning to CaptureSingle<Stdout>.
Sourcepub fn stderr_inherit(self) -> CaptureSingle<Stdout>
pub fn stderr_inherit(self) -> CaptureSingle<Stdout>
Stop capturing stderr (inherit), transitioning to CaptureSingle<Stdout>.
Sourcepub async fn run(self) -> Result<CaptureAllResult, CommandError>
pub async fn run(self) -> Result<CaptureAllResult, CommandError>
Execute the command and return captured output from both streams.
Auto Trait Implementations§
impl Freeze for CaptureAll
impl !RefUnwindSafe for CaptureAll
impl Send for CaptureAll
impl Sync for CaptureAll
impl Unpin for CaptureAll
impl !UnwindSafe for CaptureAll
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