pub struct NatTraversalConfig { /* private fields */ }Expand description
NAT traversal configuration for a QUIC connection
This configuration is negotiated as part of the transport parameters and enables QUIC NAT traversal extension functionality.
Implementations§
Source§impl NatTraversalConfig
impl NatTraversalConfig
Sourcepub fn new(
role: NatTraversalRole,
max_candidates: VarInt,
coordination_timeout: VarInt,
max_concurrent_attempts: VarInt,
peer_id: Option<[u8; 32]>,
) -> Self
pub fn new( role: NatTraversalRole, max_candidates: VarInt, coordination_timeout: VarInt, max_concurrent_attempts: VarInt, peer_id: Option<[u8; 32]>, ) -> Self
Create a new NAT traversal configuration
This is a public constructor for creating NAT traversal configurations in tests and external code.
Sourcepub fn role(&self) -> NatTraversalRole
pub fn role(&self) -> NatTraversalRole
Get the role for this NAT traversal configuration
Sourcepub fn max_candidates(&self) -> VarInt
pub fn max_candidates(&self) -> VarInt
Get the maximum number of candidates
Sourcepub fn coordination_timeout(&self) -> VarInt
pub fn coordination_timeout(&self) -> VarInt
Get the coordination timeout
Sourcepub fn max_concurrent_attempts(&self) -> VarInt
pub fn max_concurrent_attempts(&self) -> VarInt
Get the maximum concurrent attempts
Trait Implementations§
Source§impl Clone for NatTraversalConfig
impl Clone for NatTraversalConfig
Source§fn clone(&self) -> NatTraversalConfig
fn clone(&self) -> NatTraversalConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NatTraversalConfig
impl Debug for NatTraversalConfig
Source§impl Default for NatTraversalConfig
impl Default for NatTraversalConfig
Source§impl PartialEq for NatTraversalConfig
impl PartialEq for NatTraversalConfig
impl Eq for NatTraversalConfig
impl StructuralPartialEq for NatTraversalConfig
Auto Trait Implementations§
impl Freeze for NatTraversalConfig
impl RefUnwindSafe for NatTraversalConfig
impl Send for NatTraversalConfig
impl Sync for NatTraversalConfig
impl Unpin for NatTraversalConfig
impl UnwindSafe for NatTraversalConfig
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.