pub struct CaptureData {
    pub stdout: Vec<u8>,
    pub stderr: Vec<u8>,
    pub exit_status: ExitStatus,
}
Expand description

Data captured by Exec::capture and Pipeline::capture.

Fields

stdout: Vec<u8>

Standard output as bytes.

stderr: Vec<u8>

Standard error as bytes.

exit_status: ExitStatus

Exit status.

Implementations

Returns the standard output as string, converted from bytes using String::from_utf8_lossy.

Returns the standard error as string, converted from bytes using String::from_utf8_lossy.

True if the exit status of the process or pipeline is 0.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.