pub struct Dial<E> { /* private fields */ }Expand description
One dial of a reconnecting connection, waiting for the tokens it presents.
Dropping it unanswered fails it, as fail would.
Implementations§
Source§impl<E> Dial<E>
impl<E> Dial<E>
Sourcepub fn url(&self) -> &Url
pub fn url(&self) -> &Url
Where the dial goes: one of the configured addresses, or where a GOAWAY redirected it.
Sourcepub fn failure(&self) -> Option<&E>
pub fn failure(&self) -> Option<&E>
Why the previous attempt or session ended, such as a refused credential or a redirect
before the session was healthy, or None when nothing failed since a session was last
established, as for the first dial or a healthy session’s GOAWAY handover. Mirrors the
connection’s own record of why it is retrying.
Sourcepub fn present(self, tokens: Vec<Token>)
pub fn present(self, tokens: Vec<Token>)
Present tokens on this dial, as Reconnect::with_tokens
would: the first is the connection credential, and the rest ride AUTH on its session.
Only the credential is this dial’s alone. The rest join the connection’s shared set, which a successor attaches to before its own answer replaces them, so a single-use token belongs first.