pub enum Attempt<T> {
Ok(T),
Fatal(Error),
Retry {
error: Error,
retry_after: Option<Duration>,
},
}Expand description
Outcome of a single attempt.
Variants§
Ok(T)
Fatal(Error)
Permanent failure — return immediately.
Retry
Transient failure — try again. retry_after is the server-hinted delay.
Auto Trait Implementations§
impl<T> Freeze for Attempt<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Attempt<T>
impl<T> Send for Attempt<T>where
T: Send,
impl<T> Sync for Attempt<T>where
T: Sync,
impl<T> Unpin for Attempt<T>where
T: Unpin,
impl<T> UnsafeUnpin for Attempt<T>where
T: UnsafeUnpin,
impl<T> !UnwindSafe for Attempt<T>
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