pub enum GitError {
GitNotFound,
CloneFailed {
repo: String,
message: String,
},
FetchFailed {
repo: String,
message: String,
},
PullFailed {
repo: String,
message: String,
},
UncommittedRepository {
path: String,
},
NotARepository {
path: String,
},
PermissionDenied(String),
SshKeyMissing {
host: String,
},
SshAuthFailed {
host: String,
message: String,
},
CommandFailed(String),
Timeout {
seconds: u64,
},
}Expand description
Errors that occur during git operations.
Variants§
GitNotFound
Git executable not found in PATH.
CloneFailed
Clone operation failed.
FetchFailed
Fetch operation failed.
PullFailed
Pull operation failed.
UncommittedRepository
Repository has uncommitted changes that would be overwritten.
NotARepository
Path is not a git repository.
PermissionDenied(String)
Permission denied during git operation.
SshKeyMissing
SSH key not configured for the host.
SshAuthFailed
SSH authentication failed.
CommandFailed(String)
Generic command execution failure.
Timeout
Timeout during git operation.
Implementations§
Source§impl GitError
impl GitError
Sourcepub fn clone_failed(repo: impl Into<String>, message: impl Into<String>) -> Self
pub fn clone_failed(repo: impl Into<String>, message: impl Into<String>) -> Self
Creates a clone failed error.
Sourcepub fn fetch_failed(repo: impl AsRef<Path>, message: impl Into<String>) -> Self
pub fn fetch_failed(repo: impl AsRef<Path>, message: impl Into<String>) -> Self
Creates a fetch failed error.
Sourcepub fn pull_failed(repo: impl AsRef<Path>, message: impl Into<String>) -> Self
pub fn pull_failed(repo: impl AsRef<Path>, message: impl Into<String>) -> Self
Creates a pull failed error.
Sourcepub fn command_failed(
command: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn command_failed( command: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a command failed error.
Sourcepub fn is_skippable(&self) -> bool
pub fn is_skippable(&self) -> bool
Returns true if this error indicates the repository can be skipped
safely without affecting other operations.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true if this error might be resolved by retrying.
Sourcepub fn suggested_action(&self) -> &'static str
pub fn suggested_action(&self) -> &'static str
Returns a user-friendly suggestion for how to resolve this error.
Sourcepub fn repo_identifier(&self) -> Option<&str>
pub fn repo_identifier(&self) -> Option<&str>
Extracts the repository identifier from the error, if available.
Trait Implementations§
Source§impl Error for GitError
impl Error for GitError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for GitError
impl RefUnwindSafe for GitError
impl Send for GitError
impl Sync for GitError
impl Unpin for GitError
impl UnsafeUnpin for GitError
impl UnwindSafe for GitError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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>
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.