[][src]Struct cargo::util::errors::CliError

pub struct CliError {
    pub error: Option<Error>,
    pub exit_code: i32,
}

The CLI error is the error type used at Cargo's CLI-layer.

All errors from the lib side of Cargo will get wrapped with this error. Other errors (such as command-line argument validation) will create this directly.

Fields

error: Option<Error>

The error to display. This can be None in rare cases to exit with a code without displaying a message. For example cargo run -q where the resulting process exits with a nonzero code (on Windows), or an external subcommand that exits nonzero (we assume it printed its own message).

exit_code: i32

The process exit code.

Implementations

impl CliError[src]

pub fn new(error: Error, code: i32) -> CliError[src]

pub fn code(code: i32) -> CliError[src]

Trait Implementations

impl Debug for CliError[src]

impl From<Error> for CliError[src]

impl From<Error> for CliError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,