#[non_exhaustive]pub enum RemoteUnreadableReason {
RepositoryNotFound,
Transport {
detail: String,
},
HttpStatus {
status: u16,
},
NotGitServer {
status: u16,
content_type: Option<String>,
},
NoHandshake,
ResponseTruncated,
}Expand description
Why a remote could not be read or written (Error::RemoteUnreadable).
Every reason is a failure to talk to the remote at all, as opposed to the remote refusing
an update. Self::Transport is the one usually worth retrying on a flaky network.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RepositoryNotFound
A local path or file:// URL does not name a Git directory (valid HEAD, plus
objects/ and refs/ in the common directory).
Transport
The connection failed or broke: name resolution, refused or reset connection, TLS, or timeouts.
HttpStatus
A smart-HTTP server answered with an error status other than an authentication
challenge (those are Error::Auth).
NotGitServer
An HTTP response looked successful but was not a Git smart-HTTP ref advertisement
(for example 200 text/html from a parked or mistyped host).
Fields
NoHandshake
The transport ran, but the remote never completed the Git protocol handshake (for
example ssh exited, or a git:// peer closed, before any ref advertisement).
ResponseTruncated
The remote ended a fetch response before sending the pack it was asked for (the
stream closed before the packfile section).
Implementations§
Trait Implementations§
Source§impl Clone for RemoteUnreadableReason
impl Clone for RemoteUnreadableReason
Source§impl Debug for RemoteUnreadableReason
impl Debug for RemoteUnreadableReason
impl Eq for RemoteUnreadableReason
Source§impl PartialEq for RemoteUnreadableReason
impl PartialEq for RemoteUnreadableReason
impl StructuralPartialEq for RemoteUnreadableReason
Auto Trait Implementations§
impl Freeze for RemoteUnreadableReason
impl RefUnwindSafe for RemoteUnreadableReason
impl Send for RemoteUnreadableReason
impl Sync for RemoteUnreadableReason
impl Unpin for RemoteUnreadableReason
impl UnsafeUnpin for RemoteUnreadableReason
impl UnwindSafe for RemoteUnreadableReason
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.