pub struct TransportContext {
pub local_addr: SocketAddr,
pub peer_addr: SocketAddr,
pub protocol: Protocol,
pub ecn: Option<EcnCodepoint>,
}
Expand description
Transport Context with local address, peer address, ECN, protocol, etc.
Fields§
§local_addr: SocketAddr
Local socket address, either IPv4 or IPv6
peer_addr: SocketAddr
Peer socket address, either IPv4 or IPv6
protocol: Protocol
Type of protocol, either UDP or TCP
ecn: Option<EcnCodepoint>
Explicit congestion notification bits to set on the packet
Trait Implementations§
Source§impl Clone for TransportContext
impl Clone for TransportContext
Source§fn clone(&self) -> TransportContext
fn clone(&self) -> TransportContext
Returns a copy 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 TransportContext
impl Debug for TransportContext
Source§impl Default for TransportContext
impl Default for TransportContext
Source§fn default() -> TransportContext
fn default() -> TransportContext
Returns the “default value” for a type. Read more
Source§impl Hash for TransportContext
impl Hash for TransportContext
Source§impl Ord for TransportContext
impl Ord for TransportContext
Source§fn cmp(&self, other: &TransportContext) -> Ordering
fn cmp(&self, other: &TransportContext) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TransportContext
impl PartialEq for TransportContext
Source§impl PartialOrd for TransportContext
impl PartialOrd for TransportContext
impl Copy for TransportContext
impl Eq for TransportContext
impl StructuralPartialEq for TransportContext
Auto Trait Implementations§
impl Freeze for TransportContext
impl RefUnwindSafe for TransportContext
impl Send for TransportContext
impl Sync for TransportContext
impl Unpin for TransportContext
impl UnwindSafe for TransportContext
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