Enum termimage::Outcome
[−]
[src]
pub enum Outcome { NoError, GuessingFormatFailed(String), }
Enum representing all possible values the application can fail.
Variants
NoError
No errors occured, everything executed correctly.
GuessingFormatFailed(String)
The specified file would need to be overriden but was not allowed to.
Methods
impl Outcome
[src]
fn print_error<W: Write>(&self, err_out: &mut W)
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());
fn exit_value(&self) -> i32
Get the executable exit value from an Outcome
instance.
Examples
exit(Outcome::NoError.exit_value());
Trait Implementations
impl Debug for Outcome
[src]
impl Clone for Outcome
[src]
fn clone(&self) -> Outcome
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Hash for Outcome
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl PartialEq for Outcome
[src]
fn eq(&self, __arg_0: &Outcome) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Outcome) -> bool
This method tests for !=
.