pub struct ProcessOutput {
pub exit_code: Option<i32>,
pub stderr: String,
}Expand description
Output of a failed child process, in the structured form the error carries.
§Redaction
This is a diagnostic channel that reaches logs, so it must never carry
credential material. It is safe for the two producers that build it today —
python3 -m venv and pip install -r, neither of which is passed a token
or a credentialed URL — and it is not safe to reuse for a process whose
argv, environment, or index URL embeds a secret. pip’s own output already
redacts the userinfo component of an index URL, but a caller that puts a
token somewhere else on the command line would defeat that; such a caller
must scrub before constructing this.
Fields§
§exit_code: Option<i32>The child’s exit status code, or None if it was killed by a signal.
stderr: StringThe child’s stderr, already decoded lossily and trimmed.
Implementations§
Source§impl ProcessOutput
impl ProcessOutput
Sourcepub fn from_output(output: &Output) -> Self
pub fn from_output(output: &Output) -> Self
Build from a std::process::Output, decoding stderr lossily.
See the type-level redaction note: only use this for a child whose output cannot contain credential material.