pub struct Retry {
pub attempts: u32,
pub first_delay: Duration,
}Expand description
How a purse resends a transfer that failed on the way: a lost
connection, a timeout, or a mint that was paused, busy or could not
store it. Resending is safe, since the mint answers an identical
transfer with the identical notes, before or after a rotation, for as
long as it remembers the transfer (see Purse::settle).
When the mint answers busy, the next wait is as long as its
Retry-After asks, up to 30 seconds, if that is longer; the waits after
it double from where they were. A Retry-After on any other answer,
such as a proxy’s, changes no wait. The mint answers busy only to a
request it did not apply, so with the default and Client::new’s
30-second timeout the last try still ends within 127 seconds of any the
mint may have applied, inside the 128 seconds a mint keeps each answer
by default, and is answered as before.
Fields§
§attempts: u32Tries in all, the first included.
first_delay: DurationWait before the second try; it doubles before each further one.
Trait Implementations§
impl Copy for Retry
impl Eq for Retry
impl StructuralPartialEq for Retry
Auto Trait Implementations§
impl Freeze for Retry
impl RefUnwindSafe for Retry
impl Send for Retry
impl Sync for Retry
impl Unpin for Retry
impl UnsafeUnpin for Retry
impl UnwindSafe for Retry
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.