Enum termimage::Outcome [] [src]

pub enum Outcome {
    NoError,
    GuessingFormatFailed(String),
}

Enum representing all possible values the application can fail.

Variants

No errors occured, everything executed correctly.

The specified file would need to be overriden but was not allowed to.

Methods

impl Outcome
[src]

Get the executable exit value from an Outcome instance.

Examples

let mut out = Vec::new();
Outcome::GuessingFormatFailed("not_image.rs".to_string()).print_error(&mut out);
assert_eq!(String::from_iter(out.iter().map(|&i| i as char)),
           "Failed to guess format of \"not_image.rs\".\n".to_string());

Get the executable exit value from an Outcome instance.

Examples

exit(Outcome::NoError.exit_value());

Trait Implementations

impl Debug for Outcome
[src]

Formats the value using the given formatter.

impl Clone for Outcome
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for Outcome
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl PartialEq for Outcome
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Outcome
[src]