pub struct GitCliError {
inner: Error,
is_spurious: bool,
workaround: Option<&'static str>,
}Expand description
An error that occurred while invoking the git command-line tool.
This is used for errors from Git operations performed via CLI. It wraps a lower-level error and indicates whether the failure should be considered spurious.
Spurious failures might involve retry mechanism.
Fields§
§inner: Error§is_spurious: bool§workaround: Option<&'static str>Implementations§
Source§impl GitCliError
impl GitCliError
pub fn new(inner: Error) -> GitCliError
pub fn workaround(self, workaround: &'static str) -> Self
pub fn spurious(self, yes: bool) -> Self
pub fn is_spurious(&self) -> bool
Trait Implementations§
Source§impl Debug for GitCliError
impl Debug for GitCliError
Source§impl Display for GitCliError
impl Display for GitCliError
Source§impl Error for GitCliError
impl Error for GitCliError
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 Forget for GitCliError
impl Freeze for GitCliError
impl RefUnwindSafe for GitCliError
impl Send for GitCliError
impl Sync for GitCliError
impl Unpin for GitCliError
impl UnsafeUnpin for GitCliError
impl UnwindSafe for GitCliError
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
§impl<T> ErrorExt for T
impl<T> ErrorExt for T
§fn raise(self) -> Errorwhere
Self: Sized,
fn raise(self) -> Errorwhere
Self: Sized,
Raise this error at the caller’s location, returning a public [
Error].
An existing [Error] is returned unchanged, preserving its representation and allocation.§fn raise_typed(self) -> Exn<Self>where
Self: Sized,
fn raise_typed(self) -> Exn<Self>where
Self: Sized,
Raise this error as a typed exception, retaining
Self even when it is already an [Error].§fn and_raise_typed<T>(self, context: T) -> Exn<T>
fn and_raise_typed<T>(self, context: T) -> Exn<T>
Like [
Self::and_raise()], retaining the context’s type in an exception.§fn raise_erased(self) -> Exnwhere
Self: Sized,
fn raise_erased(self) -> Exnwhere
Self: Sized,
Raise this error as a new exception, with type erasure.
Tree-backed [
crate::Error] values reuse their existing frame and caller location.§fn raise_all<T, I>(self, sources: I) -> Exn<Self>where
Self: Sized,
T: Error + Send + Sync + 'static,
I: IntoIterator,
<I as IntoIterator>::Item: Into<Exn<T>>,
fn raise_all<T, I>(self, sources: I) -> Exn<Self>where
Self: Sized,
T: Error + Send + Sync + 'static,
I: IntoIterator,
<I as IntoIterator>::Item: Into<Exn<T>>,
Raise this error as a new exception, with
sources as causes.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes