#[repr(u8)]pub enum RetryCause {
Interrupted = 0,
WouldBlock = 1,
VanishedUnderWalk = 2,
SizeChangedUnderRead = 3,
Locked = 4,
RateLimited = 5,
Network = 6,
PackRewritten = 7,
}Expand description
Why one operation was attempted again.
A retry that fires is evidence of a defect, not a success, so every attempt is counted and surfaced. There is deliberately no catch-all cause: an unclassified failure is permanent and is not retried, which is what stops “it will just retry” from becoming a reason to ship a racy path.
Variants§
Interrupted = 0
A syscall returned EINTR.
WouldBlock = 1
A syscall returned EAGAIN or EWOULDBLOCK.
VanishedUnderWalk = 2
ENOENT or ESTALE on a path the walker had already enumerated.
SizeChangedUnderRead = 3
The file was replaced, truncated, or grown between the size decision and the completion of the read.
Locked = 4
EBUSY, ETXTBSY, or a sharing violation.
RateLimited = 5
A 429 or an equivalent provider throttle.
Network = 6
Connection reset, timeout, or name resolution failure.
PackRewritten = 7
A git pack was rewritten while it was being read.
Implementations§
Source§impl RetryCause
impl RetryCause
Trait Implementations§
Source§impl Clone for RetryCause
impl Clone for RetryCause
Source§fn clone(&self) -> RetryCause
fn clone(&self) -> RetryCause
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RetryCause
Source§impl Debug for RetryCause
impl Debug for RetryCause
Source§impl<'de> Deserialize<'de> for RetryCause
impl<'de> Deserialize<'de> for RetryCause
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RetryCause
Source§impl Hash for RetryCause
impl Hash for RetryCause
Source§impl Ord for RetryCause
impl Ord for RetryCause
Source§fn cmp(&self, other: &RetryCause) -> Ordering
fn cmp(&self, other: &RetryCause) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RetryCause
impl PartialEq for RetryCause
Source§impl PartialOrd for RetryCause
impl PartialOrd for RetryCause
Source§impl Serialize for RetryCause
impl Serialize for RetryCause
impl StructuralPartialEq for RetryCause
Auto Trait Implementations§
impl Freeze for RetryCause
impl RefUnwindSafe for RetryCause
impl Send for RetryCause
impl Sync for RetryCause
impl Unpin for RetryCause
impl UnsafeUnpin for RetryCause
impl UnwindSafe for RetryCause
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