#[non_exhaustive]pub struct Config {
pub backoff: Backoff,
pub goaway: Handover,
pub restart: Restart,
pub timeout: Option<Duration>,
pub once: bool,
pub pinned: bool,
}Expand description
The whole connect policy for one peer.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.backoff: BackoffWhen to redial, and when to give up.
goaway: HandoverHow to follow a peer’s GOAWAY.
restart: RestartWhat a GOAWAY naming no URI does.
timeout: Option<Duration>The deadline for one dial and its handshake, through the peer’s answer to the credential
on a version that has one. None waits forever. Defaults to 30 s.
once: boolEnd when the first session ends instead of redialing. Defaults to false.
A GOAWAY then ends it cleanly: with no replacement to dial, leaving is the answer.
pinned: boolWhether the dial pins a certificate fingerprint, which verifies only the host it was configured for, so a GOAWAY may not move an encrypted dial to another host.
Trait Implementations§
impl Copy for Config
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.