CommandStatus

Type Alias CommandStatus 

Source
pub type CommandStatus = Result<String, String>;
Expand description

Denotes the exit status of a command.

An Ok indicates that the command exits with no error, with a payload of the command output. An Err indicates that the command exits with error, or is not executed (e.g. the command issuer does not have sufficient permission), with a payload of the formatted error message.

§Payload

The payload would be a string that might contain ANSI Escape Color Codes. Therefore, it is recommended to perform corresponding checks before printing the message.

Aliased Type§

pub enum CommandStatus {
    Ok(String),
    Err(String),
}

Variants§

§1.0.0

Ok(String)

Contains the success value

§1.0.0

Err(String)

Contains the error value