pub enum ConnectionMethod {
DirectIPv4,
DirectIPv6,
HolePunched {
coordinator: SocketAddr,
},
Relayed {
relay: SocketAddr,
},
}Expand description
How a connection was established
Variants§
DirectIPv4
Direct IPv4 connection succeeded
DirectIPv6
Direct IPv6 connection succeeded (NAT bypassed)
HolePunched
Connection established via coordinated hole-punching
Fields
§
coordinator: SocketAddrThe coordinator peer that helped with hole-punching
Relayed
Connection established via relay
Fields
§
relay: SocketAddrThe relay server address
Trait Implementations§
Source§impl Clone for ConnectionMethod
impl Clone for ConnectionMethod
Source§fn clone(&self) -> ConnectionMethod
fn clone(&self) -> ConnectionMethod
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 ConnectionMethod
impl Debug for ConnectionMethod
Source§impl Display for ConnectionMethod
impl Display for ConnectionMethod
Source§impl PartialEq for ConnectionMethod
impl PartialEq for ConnectionMethod
impl Eq for ConnectionMethod
impl StructuralPartialEq for ConnectionMethod
Auto Trait Implementations§
impl Freeze for ConnectionMethod
impl RefUnwindSafe for ConnectionMethod
impl Send for ConnectionMethod
impl Sync for ConnectionMethod
impl Unpin for ConnectionMethod
impl UnwindSafe for ConnectionMethod
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.