Enum ya_relay_stack::socket::SocketEndpoint
source · pub enum SocketEndpoint {
Ip(IpEndpoint),
Icmp(IcmpEndpoint),
Other,
}Expand description
Socket endpoint kind
Variants§
Implementations§
source§impl SocketEndpoint
impl SocketEndpoint
pub fn ip_endpoint(&self) -> Result<IpEndpoint, Error>
pub fn is_specified(&self) -> bool
pub fn addr_repr(&self) -> String
pub fn port_repr(&self) -> String
Trait Implementations§
source§impl Clone for SocketEndpoint
impl Clone for SocketEndpoint
source§fn clone(&self) -> SocketEndpoint
fn clone(&self) -> SocketEndpoint
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 SocketEndpoint
impl Debug for SocketEndpoint
source§impl<'a> From<&'a ConnectionMeta> for SocketEndpoint
impl<'a> From<&'a ConnectionMeta> for SocketEndpoint
source§fn from(c: &'a ConnectionMeta) -> Self
fn from(c: &'a ConnectionMeta) -> Self
Converts to this type from the input type.
source§impl From<()> for SocketEndpoint
impl From<()> for SocketEndpoint
source§fn from(original: ()) -> SocketEndpoint
fn from(original: ()) -> SocketEndpoint
Converts to this type from the input type.
source§impl From<Endpoint> for SocketEndpoint
impl From<Endpoint> for SocketEndpoint
source§fn from(original: IpEndpoint) -> SocketEndpoint
fn from(original: IpEndpoint) -> SocketEndpoint
Converts to this type from the input type.
source§impl From<Endpoint> for SocketEndpoint
impl From<Endpoint> for SocketEndpoint
source§fn from(original: IcmpEndpoint) -> SocketEndpoint
fn from(original: IcmpEndpoint) -> SocketEndpoint
Converts to this type from the input type.
source§impl From<Option<Endpoint>> for SocketEndpoint
impl From<Option<Endpoint>> for SocketEndpoint
source§fn from(opt: Option<IpEndpoint>) -> Self
fn from(opt: Option<IpEndpoint>) -> Self
Converts to this type from the input type.
source§impl From<u16> for SocketEndpoint
impl From<u16> for SocketEndpoint
source§impl Hash for SocketEndpoint
impl Hash for SocketEndpoint
source§impl Ord for SocketEndpoint
impl Ord for SocketEndpoint
source§fn cmp(&self, other: &SocketEndpoint) -> Ordering
fn cmp(&self, other: &SocketEndpoint) -> 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<Endpoint> for SocketEndpoint
impl PartialEq<Endpoint> for SocketEndpoint
source§fn eq(&self, other: &IpEndpoint) -> bool
fn eq(&self, other: &IpEndpoint) -> bool
source§impl PartialEq<SocketEndpoint> for SocketEndpoint
impl PartialEq<SocketEndpoint> for SocketEndpoint
source§fn eq(&self, other: &SocketEndpoint) -> bool
fn eq(&self, other: &SocketEndpoint) -> bool
source§impl PartialOrd<SocketEndpoint> for SocketEndpoint
impl PartialOrd<SocketEndpoint> for SocketEndpoint
source§fn partial_cmp(&self, other: &SocketEndpoint) -> Option<Ordering>
fn partial_cmp(&self, other: &SocketEndpoint) -> 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