Enum x_core::SystemError
source · #[non_exhaustive]
pub enum SystemError {
CwdNotInProjectRoot {
current_dir: Utf8PathBuf,
project_root: &'static Utf8Path,
},
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,
},
}
Expand description
A system error that happened while running a lint.
Variants (Non-exhaustive)§
This enum is marked as 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
Exec
GitRoot(Cow<'static, str>)
FromHex
Guppy
HakariCargoToml
HakariTomlOut
Io
NonUtf8Path
Serde
TargetSpec
Implementations§
source§impl SystemError
impl SystemError
pub fn io(context: impl Into<Cow<'static, str>>, err: Error) -> Self
pub fn guppy(context: impl Into<Cow<'static, str>>, err: Error) -> Self
pub fn git_root(msg: impl Into<Cow<'static, str>>) -> Self
pub fn from_hex(context: impl Into<Cow<'static, str>>, err: FromHexError) -> Self
pub fn hakari_cargo_toml( context: impl Into<Cow<'static, str>>, err: CargoTomlError ) -> Self
pub fn hakari_toml_out( context: impl Into<Cow<'static, str>>, err: TomlOutError ) -> Self
pub fn de( context: impl Into<Cow<'static, str>>, err: impl Error + Send + Sync + 'static ) -> Self
pub fn ser( context: impl Into<Cow<'static, str>>, err: impl Error + Send + Sync + 'static ) -> Self
pub fn target_spec( context: impl Into<Cow<'static, str>>, err: TargetSpecError ) -> Self
Trait Implementations§
source§impl Debug for SystemError
impl Debug for SystemError
source§impl Display for SystemError
impl Display for SystemError
source§impl Error for SystemError
impl Error for SystemError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for SystemError
impl Send for SystemError
impl Sync for SystemError
impl Unpin for SystemError
impl !UnwindSafe for SystemError
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SafeBorrow<T> for Twhere
T: ?Sized,
impl<T> SafeBorrow<T> for Twhere T: ?Sized,
§fn borrow_replacement(ptr: &T) -> &T
fn borrow_replacement(ptr: &T) -> &T
Given
ptr
, which was obtained from a prior call to Self::borrow()
,
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self
. Read more