#[non_exhaustive]pub enum Error {
UnknownScope {
name: String,
},
UnknownEvent {
name: String,
},
UnknownHarness {
harness: String,
},
UnsupportedScope {
harness: String,
scope: Scope,
},
UnknownPart {
harness: String,
part: String,
},
Unsupported {
harness: String,
what: String,
},
File {
file: String,
message: String,
},
Refused(String),
Io {
path: PathBuf,
source: Error,
},
Internal(String),
}Expand description
Everything that can go wrong in the library. Every variant but Error::Io
and Error::Internal is a refusal: install returns it before any
write.
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.
UnknownScope
A scope name that is not project or user.
UnknownEvent
A hook event name that is not one of Event’s.
UnknownHarness
A harness id the tool does not support.
UnsupportedScope
A harness that has no files at the scope.
UnknownPart
A part name (e.g. in --without) no named harness’s profile has.
Fields
Unsupported
Something a harness cannot do, e.g. an answer it cannot express for an event.
File
A file the library must read does not parse or has the wrong shape.
Refused(String)
A refusal from the tool’s own ExternalPart or DeclinedStore.
Io
An I/O failure on path.
Internal(String)
A bug, or an inconsistent integration or harness.
Implementations§
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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