pub enum SocketEndpoint {
Ip(IpEndpoint),
Icmp(Endpoint),
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 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 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: Endpoint) -> SocketEndpoint
fn from(original: Endpoint) -> 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§impl PartialEq for SocketEndpoint
impl PartialEq for SocketEndpoint
Source§impl PartialOrd for SocketEndpoint
impl PartialOrd for SocketEndpoint
impl Copy for SocketEndpoint
impl Eq for SocketEndpoint
impl StructuralPartialEq for SocketEndpoint
Auto Trait Implementations§
impl Freeze for SocketEndpoint
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