Struct ya_relay_stack::connection::Connection
source · pub struct Connection {
pub handle: SocketHandle,
pub meta: ConnectionMeta,
}Expand description
Virtual connection representing 2 endpoints with an existing record of exchanging packets via a known protocol; not necessarily a TCP connection
Fields§
§handle: SocketHandle§meta: ConnectionMetaImplementations§
source§impl Connection
impl Connection
pub fn try_new<T, E>(handle: SocketHandle, t: T) -> Result<Self>where
ConnectionMeta: TryFrom<T, Error = E>,
Error: From<E>,
Trait Implementations§
source§impl Clone for Connection
impl Clone for Connection
source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
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 Connection
impl Debug for Connection
source§impl From<Connection> for ConnectionMeta
impl From<Connection> for ConnectionMeta
source§fn from(c: Connection) -> Self
fn from(c: Connection) -> Self
Converts to this type from the input type.
source§impl From<Connection> for SocketDesc
impl From<Connection> for SocketDesc
source§fn from(c: Connection) -> Self
fn from(c: Connection) -> Self
Converts to this type from the input type.
source§impl From<Connection> for SocketHandle
impl From<Connection> for SocketHandle
source§fn from(c: Connection) -> Self
fn from(c: Connection) -> Self
Converts to this type from the input type.
source§impl Hash for Connection
impl Hash for Connection
source§impl Ord for Connection
impl Ord for Connection
source§fn cmp(&self, other: &Connection) -> Ordering
fn cmp(&self, other: &Connection) -> 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<Connection> for Connection
impl PartialEq<Connection> for Connection
source§fn eq(&self, other: &Connection) -> bool
fn eq(&self, other: &Connection) -> bool
source§impl PartialOrd<Connection> for Connection
impl PartialOrd<Connection> for Connection
source§fn partial_cmp(&self, other: &Connection) -> Option<Ordering>
fn partial_cmp(&self, other: &Connection) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more