[][src]Struct internet2::addr::InetSocketAddr

pub struct InetSocketAddr {
    pub address: InetAddr,
    pub port: u16,
}

Internet socket address, which consists of InetAddr IP or Tor address and a port number (without protocol specification, i.e. TCP/UDP etc). If you need to include transport-level protocol information into the socket details, pls check InetSocketAddrExt

Fields

address: InetAddr

Address part of the socket

port: u16

Port of the socket

Implementations

impl InetSocketAddr[src]

pub fn new(address: InetAddr, port: u16) -> InetSocketAddr[src]

Constructs new socket address from an internet address and a port information

pub fn is_tor(&self) -> bool[src]

Determines whether provided address is a Tor address

Trait Implementations

impl Clone for InetSocketAddr[src]

impl Copy for InetSocketAddr[src]

impl Debug for InetSocketAddr[src]

impl Default for InetSocketAddr[src]

impl Display for InetSocketAddr[src]

impl Eq for InetSocketAddr[src]

impl From<RemoteSocketAddr> for InetSocketAddr[src]

impl From<SocketAddr> for InetSocketAddr[src]

impl From<SocketAddrV4> for InetSocketAddr[src]

impl From<SocketAddrV6> for InetSocketAddr[src]

impl FromStr for InetSocketAddr[src]

type Err = AddrParseError

The associated error which can be returned from parsing.

impl Hash for InetSocketAddr[src]

impl Ord for InetSocketAddr[src]

impl PartialEq<InetSocketAddr> for InetSocketAddr[src]

impl PartialOrd<InetSocketAddr> for InetSocketAddr[src]

impl Strategy for InetSocketAddr[src]

impl Strategy for InetSocketAddr[src]

impl StructuralEq for InetSocketAddr[src]

impl StructuralPartialEq for InetSocketAddr[src]

impl<'_> TryFrom<&'_ str> for InetSocketAddr[src]

type Error = <InetSocketAddr as FromStr>::Err

The type returned in the event of a conversion error.

impl Uniform for InetSocketAddr[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,