pub enum RemoteError {
NoUrl {
remote: Option<String>,
},
UnsupportedScheme,
InvalidUrl(String),
HttpUnavailable,
UnknownRemote(String),
RemoteExists(String),
InvalidRemoteName(String),
Library(Error),
}Expand description
Errors specific to remote URL resolution and dispatch.
Variants§
NoUrl
A remote has no URL: remote.<name>.url is unset or blank, or a literal URL was empty.
Fields
UnsupportedScheme
The URL uses a scheme grit does not support for remotes.
InvalidUrl(String)
A URL or path failed to parse.
Smart HTTP requires the http-ureq feature or an injected HTTP client factory.
UnknownRemote(String)
The argument is neither a configured remote name nor a URL or path.
RemoteExists(String)
RepositoryRemotes::add found an
existing remote.<name>.* section.
InvalidRemoteName(String)
The name cannot be used for a remote (refs/remotes/<name>/… would not be a valid ref).
Library(Error)
An underlying library error.
Implementations§
Source§impl RemoteError
impl RemoteError
Sourcepub fn is_remote_unreadable(&self) -> bool
pub fn is_remote_unreadable(&self) -> bool
Whether the remote could not be read or written at all (Error::RemoteUnreadable).
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Whether the operation was cancelled (Error::Cancelled).
Trait Implementations§
Source§impl Debug for RemoteError
impl Debug for RemoteError
Source§impl Display for RemoteError
impl Display for RemoteError
Source§impl Error for RemoteError
impl Error for RemoteError
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<Error> for RemoteError
impl From<Error> for RemoteError
Source§impl From<RemoteError> for PullError
impl From<RemoteError> for PullError
Source§fn from(source: RemoteError) -> Self
fn from(source: RemoteError) -> Self
Converts to this type from the input type.
Source§impl From<RemoteError> for CloneError
impl From<RemoteError> for CloneError
Source§fn from(source: RemoteError) -> Self
fn from(source: RemoteError) -> Self
Converts to this type from the input type.
Source§impl From<RemoteError> for Error
impl From<RemoteError> for Error
Source§fn from(e: RemoteError) -> Self
fn from(e: RemoteError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for RemoteError
impl !UnwindSafe for RemoteError
impl Freeze for RemoteError
impl Send for RemoteError
impl Sync for RemoteError
impl Unpin for RemoteError
impl UnsafeUnpin for RemoteError
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