pub struct ConnectionKey {
pub addr_a: SocketAddr,
pub addr_b: SocketAddr,
}Expand description
Unique key for a TCP connection (canonical - order independent)
Fields§
§addr_a: SocketAddrLower address (lexicographically sorted for consistency)
addr_b: SocketAddrHigher address
Implementations§
Source§impl ConnectionKey
impl ConnectionKey
Sourcepub fn new(addr1: SocketAddr, addr2: SocketAddr) -> Self
pub fn new(addr1: SocketAddr, addr2: SocketAddr) -> Self
Create a canonical connection key (order independent)
Trait Implementations§
Source§impl Clone for ConnectionKey
impl Clone for ConnectionKey
Source§fn clone(&self) -> ConnectionKey
fn clone(&self) -> ConnectionKey
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 ConnectionKey
impl Debug for ConnectionKey
Source§impl Hash for ConnectionKey
impl Hash for ConnectionKey
Source§impl PartialEq for ConnectionKey
impl PartialEq for ConnectionKey
impl Eq for ConnectionKey
impl StructuralPartialEq for ConnectionKey
Auto Trait Implementations§
impl Freeze for ConnectionKey
impl RefUnwindSafe for ConnectionKey
impl Send for ConnectionKey
impl Sync for ConnectionKey
impl Unpin for ConnectionKey
impl UnsafeUnpin for ConnectionKey
impl UnwindSafe for ConnectionKey
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