Enum x_core::SystemError[][src]

#[non_exhaustive]pub enum SystemError {
    CwdNotInProjectRoot {
        current_dir: PathBuf,
        project_root: &'static Path,
    },
    Exec {
        cmd: &'static str,
        status: ExitStatus,
    },
    GitRoot(Cow<'static, str>),
    FromHex {
        context: Cow<'static, str>,
        err: FromHexError,
    },
    Guppy {
        context: Cow<'static, str>,
        err: Error,
    },
    HakariCargoToml {
        context: Cow<'static, str>,
        err: CargoTomlError,
    },
    HakariTomlOut {
        context: Cow<'static, str>,
        err: TomlOutError,
    },
    Io {
        context: Cow<'static, str>,
        err: Error,
    },
    NonUtf8Path {
        path: Vec<u8>,
        err: Utf8Error,
    },
    Serde {
        context: Cow<'static, str>,
        err: Box<dyn Error + Send + Sync>,
    },
    TargetSpec {
        context: Cow<'static, str>,
        err: TargetSpecError,
    },
}

A system error that happened while running a lint.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CwdNotInProjectRoot

Fields of CwdNotInProjectRoot

current_dir: PathBufproject_root: &'static Path
Exec

Fields of Exec

cmd: &'static strstatus: ExitStatus
GitRoot(Cow<'static, str>)
FromHex

Fields of FromHex

context: Cow<'static, str>err: FromHexError
Guppy

Fields of Guppy

context: Cow<'static, str>err: Error
HakariCargoToml

Fields of HakariCargoToml

context: Cow<'static, str>err: CargoTomlError
HakariTomlOut

Fields of HakariTomlOut

context: Cow<'static, str>err: TomlOutError
Io

Fields of Io

context: Cow<'static, str>err: Error
NonUtf8Path

Fields of NonUtf8Path

path: Vec<u8>err: Utf8Error
Serde

Fields of Serde

context: Cow<'static, str>err: Box<dyn Error + Send + Sync>
TargetSpec

Fields of TargetSpec

context: Cow<'static, str>err: TargetSpecError

Implementations

impl SystemError[src]

pub fn io(context: impl Into<Cow<'static, str>>, err: Error) -> Self[src]

pub fn guppy(context: impl Into<Cow<'static, str>>, err: Error) -> Self[src]

pub fn git_root(msg: impl Into<Cow<'static, str>>) -> Self[src]

pub fn from_hex(
    context: impl Into<Cow<'static, str>>,
    err: FromHexError
) -> Self
[src]

pub fn hakari_cargo_toml(
    context: impl Into<Cow<'static, str>>,
    err: CargoTomlError
) -> Self
[src]

pub fn hakari_toml_out(
    context: impl Into<Cow<'static, str>>,
    err: TomlOutError
) -> Self
[src]

pub fn de(
    context: impl Into<Cow<'static, str>>,
    err: impl Error + Send + Sync + 'static
) -> Self
[src]

pub fn ser(
    context: impl Into<Cow<'static, str>>,
    err: impl Error + Send + Sync + 'static
) -> Self
[src]

pub fn target_spec(
    context: impl Into<Cow<'static, str>>,
    err: TargetSpecError
) -> Self
[src]

Trait Implementations

impl Debug for SystemError[src]

impl Display for SystemError[src]

impl Error for SystemError[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> Pointable for T

type Init = T

The type for initializers.

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.