#[non_exhaustive]pub enum Error {
AlpmType(Error),
Io {
context: String,
source: Error,
},
IoPath {
path: PathBuf,
context: String,
source: Error,
},
InvalidUTF8(FromUtf8Error),
MissingKeyword {
keyword: &'static str,
},
ParseError(String),
UnsupportedSchemaVersion(String),
BridgeError(Error),
BridgeConversionError(BridgeError),
}Expand description
The high-level error that can occur when using this crate.
Notably, it contains an important enum in the context of parsing:
ParseErroris an already formatted error generated by thewinnowparser. This effectively means that some invalid data has been encountered
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.
AlpmType(Error)
ALPM type error
Io
IO error
Fields
IoPath
IO error with additional path info for more context.
Fields
InvalidUTF8(FromUtf8Error)
UTF-8 parse error when reading the input file.
MissingKeyword
A section or keyword is missing for a SRCINFO schema version.
ParseError(String)
A parsing error that occurred during winnow file parsing.
UnsupportedSchemaVersion(String)
Unsupported schema version
BridgeError(Error)
A alpm-pkgbuild bridge error that occurred when converting a PKGBUILD to a SourceInfoV1.
See PkgbuildError for further details.
BridgeConversionError(BridgeError)
A logical error occurred when transforming alpm-pkgbuild-bridge script output to a
SourceInfoV1 struct.
See BridgeError for further details.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Source§impl From<BridgeError> for Error
impl From<BridgeError> for Error
Source§fn from(source: BridgeError) -> Self
fn from(source: BridgeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(source: PkgbuildError) -> Self
fn from(source: PkgbuildError) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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