#[non_exhaustive]pub enum Error {
Forge(Error),
Unsupported {
forge: ForgeKind,
operation: &'static str,
},
}Expand description
An error from a Forge operation.
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.
Forge(Error)
An underlying vcs-github / vcs-gitlab / vcs-gitea (i.e. processkit)
error.
Unsupported
The operation isn’t available on this forge’s CLI — e.g. repo_view,
pr_mark_ready, and pr_checks on Gitea, whose tea has no command for
them. The operation is the ForgeApi method name.
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_transient_fetch_error(&self) -> bool
pub fn is_transient_fetch_error(&self) -> bool
Whether this is a transient network failure worth retrying (DNS,
connection reset, timeout) — forge commands are network-bound, so a higher
flow may want to retry. Named to match the wrapper classifiers
(vcs_cli_support::is_transient_fetch_error).
Sourcepub fn is_unsupported(&self) -> bool
pub fn is_unsupported(&self) -> bool
Whether this is an Unsupported operation (rather
than a forge/network failure).
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