pub struct Dials<E> { /* private fields */ }Expand description
Tokens a reconnecting connection asks for at each dial, for a credential that must be fresh when it is presented, such as a proof a peer admits once and only shortly after it was signed.
Attach one with Reconnect::with_dials and answer each
next dial: every dial waits for its answer, whatever starts it, a reconnect, a
GOAWAY’s handover, a probe of the preferred transport, or the next address of a walk, so none
presents tokens signed for another. The wait counts against the dial’s own deadline.
Until a session is established, the policy fails fast as with fixed tokens. After that,
answering is how it retries: it backs off and asks again, with the reason on
Dial::failure, until a dial is failed. To retry a first connect that
failed, attach a fresh queue (with a fresh signer) to a new policy: the failed one keeps
this queue claimed.
Cheap to clone; every clone shares one queue, which one policy feeds: once that policy ends,
next returns None, and a policy given the queue after another took it ends
at once with Failure::Taken.