pub fn code(&self) -> i32 {
        match *self {
            Error::Command(..) => 1,
            Error::Generic(..) => 2,
            Error::Io(..) => 3,
            Error::Manifest(..) => 4,
            Error::Mustache(..) => 5,
            Error::Toml(..) => 6,
            Error::Version(..) => 7,
            Error::Xml(..) => 8,
            Error::XPath(..) => 9,
        }
    }
/// Gets an error code related to the error.
///
/// # Examples
///
/// ```rust
/// use wix::Error;
///
/// let err = Error::from("A generic error");
/// assert_ne!(err.code(), 0)
/// ```
///
/// This is useful as a return, or exit, code for a command line application, where a non-zero
/// integer indicates a failure in the application. it can also be used for quickly and easily
/// testing equality between two errors.
Gets an error code related to the error.
Gets an error code related to the error .
pub fn code(&self) -> i32 {
        match *self {
            Error::Command(..) => 1,
            Error::Generic(..) => 2,
            Error::Io(..) => 3,
            Error::Manifest(..) => 4,
            Error::Mustache(..) => 5,
            Error::Toml(..) => 6,
            Error::Version(..) => 7,
            Error::Xml(..) => 8,
            Error::XPath(..) => 9,
        }
    }
pub fn code ( & self ) -> i32 { match * self { Error :: Command ( .. ) => 1 , Error :: Generic ( .. ) => 2 , Error :: Io ( .. ) => 3 , Error :: Manifest ( .. ) => 4 , Error :: Mustache ( .. ) => 5 , Error :: Toml ( .. ) => 6 , Error :: Version ( .. ) => 7 , Error :: Xml ( .. ) => 8 , Error :: XPath ( .. ) => 9 , } }
Gets an error code related to the error.
Gets an error code related to the error .
&self
examples
```rust
use wix::Error.

let err = Error::from("A generic error");
assert_ne!(err.code(), 0)
```

This is useful as a return, or exit, code for a command line application, where a non-zero
integer indicates a failure in the application. it can also be used for quickly and easily
testing equality between two errors.
` ` ` rust use wix :: Error . let err = Error :: from ( " A generic error " ) ; assert_ne! ( err . code () 0 ) ` ` ` This is useful as a return or exit code for a command line application where a non - zero integer indicates a failure in the application . it can also be used for quickly and easily testing equality between two errors .