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 Display for SocketEndpoint
impl Display 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: IcmpEndpoint) -> SocketEndpoint
fn from(original: IcmpEndpoint) -> 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<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
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialEq<SocketEndpoint> for SocketEndpoint
impl PartialEq<SocketEndpoint> for SocketEndpoint
source§fn eq(&self, other: &SocketEndpoint) -> bool
fn eq(&self, other: &SocketEndpoint) -> bool
This method tests for
self and other values to be equal, and is used
by ==.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 moreimpl Copy for SocketEndpoint
impl Eq for SocketEndpoint
impl StructuralEq for SocketEndpoint
impl StructuralPartialEq for SocketEndpoint
Auto Trait Implementations§
impl RefUnwindSafe for SocketEndpoint
impl Send for SocketEndpoint
impl Sync for SocketEndpoint
impl Unpin for SocketEndpoint
impl UnwindSafe for SocketEndpoint
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