#[non_exhaustive]pub enum VariantError {
BadVariant(String),
FileRead(String, String, Error),
OsRelease(YAIError),
UnknownVariant,
Internal(String),
}
Expand description
An error that occurred while determining the Linux variant.
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.
BadVariant(String)
An invalid variant name was specified.
FileRead(String, String, Error)
A file to be examined could not be read.
OsRelease(YAIError)
Unexpected error parsing the /etc/os-release file.
UnknownVariant
None of the variants matched.
Internal(String)
Something went really, really wrong.
Trait Implementations§
Source§impl Debug for VariantError
impl Debug for VariantError
Source§impl Display for VariantError
impl Display for VariantError
Source§impl Error for VariantError
impl Error for VariantError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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 Freeze for VariantError
impl !RefUnwindSafe for VariantError
impl Send for VariantError
impl Sync for VariantError
impl Unpin for VariantError
impl !UnwindSafe for VariantError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more