pub enum NatTraversalConfig {
ClientSupport,
ServerSupport {
concurrency_limit: VarInt,
},
}
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.
Variants§
ClientSupport
Client supports NAT traversal (sends empty parameter)
ServerSupport
Server supports NAT traversal with specified concurrency limit
Implementations§
Source§impl NatTraversalConfig
impl NatTraversalConfig
Sourcepub fn server(concurrency_limit: VarInt) -> Result<Self, TransportError>
pub fn server(concurrency_limit: VarInt) -> Result<Self, TransportError>
Create a server configuration with concurrency limit
Sourcepub fn concurrency_limit(&self) -> Option<VarInt>
pub fn concurrency_limit(&self) -> Option<VarInt>
Get the concurrency limit if this is a server config
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§fn default() -> NatTraversalConfig
fn default() -> NatTraversalConfig
Returns the “default value” for a type. Read more
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.