Struct second_law::CmdResult [] [src]

pub struct CmdResult {
    pub settings: Arc<SceneSettings>,
    pub success: bool,
    pub stdout: String,
    pub stderr: String,
}

A command result is the outputs of a command (streams and status code) within a struct which has convenience assertion functions about those outputs

Fields

Methods

impl CmdResult
[src]

[src]

asserts that the command resulted in a success (zero) status code

[src]

asserts that the command resulted in a failure (non-zero) status code

[src]

asserts that the command resulted in empty (zero-length) stderr stream output generally, it's better to use stdout_only() instead, but you might find yourself using this function if 1. you can not know exactly what stdout will be or 2. you know that stdout will also be empty

[src]

asserts that the command resulted in empty (zero-length) stderr stream output unless asserting there was neither stdout or stderr, stderr_only is usually a better choice generally, it's better to use stderr_only() instead, but you might find yourself using this function if 1. you can not know exactly what stderr will be or 2. you know that stderr will also be empty

[src]

asserts that the command resulted in stdout stream output that equals the passed in value, when both are trimmed of trailing whitespace stdout_only is a better choice unless stderr may or will be non-empty

[src]

like stdout_is(...), but expects the contents of the file at the provided relative path

[src]

asserts that the command resulted in stderr stream output that equals the passed in value, when both are trimmed of trailing whitespace stderr_only is a better choice unless stdout may or will be non-empty

[src]

like stderr_is(...), but expects the contents of the file at the provided relative path

[src]

asserts that 1. the command resulted in stdout stream output that equals the passed in value, when both are trimmed of trailing whitespace and 2. the command resulted in empty (zero-length) stderr stream output

[src]

like stdout_only(...), but expects the contents of the file at the provided relative path

[src]

asserts that 1. the command resulted in stderr stream output that equals the passed in value, when both are trimmed of trailing whitespace and 2. the command resulted in empty (zero-length) stdout stream output

[src]

like stderr_only(...), but expects the contents of the file at the provided relative path

[src]