[][src]Enum sgx_tstd::net::IpAddr

pub enum IpAddr {
    V4(Ipv4Addr),
    V6(Ipv6Addr),
}

An IP address, either IPv4 or IPv6.

This enum can contain either an Ipv4Addr or an Ipv6Addr, see their respective documentation for more details.

The size of an IpAddr instance may vary depending on the target operating system.

Variants

V4(Ipv4Addr)

An IPv4 address.

V6(Ipv6Addr)

An IPv6 address.

Methods

impl IpAddr[src]

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

Returns true for the special 'unspecified' address.

See the documentation for Ipv4Addr::is_unspecified and Ipv6Addr::is_unspecified for more details.

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

Returns true if this is a loopback address.

See the documentation for Ipv4Addr::is_loopback and Ipv6Addr::is_loopback for more details.

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

Returns true if the address appears to be globally routable.

See the documentation for Ipv4Addr::is_global and Ipv6Addr::is_global for more details.

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

Returns true if this is a multicast address.

See the documentation for Ipv4Addr::is_multicast and Ipv6Addr::is_multicast for more details.

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

Returns true if this address is in a range designated for documentation.

See the documentation for Ipv4Addr::is_documentation and Ipv6Addr::is_documentation for more details.

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

Returns true if this address is an IPv4 address, and false otherwise.

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

Returns true if this address is an IPv6 address, and false otherwise.

Trait Implementations

impl Clone for IpAddr[src]

impl Copy for IpAddr[src]

impl Debug for IpAddr[src]

impl Display for IpAddr[src]

impl Eq for IpAddr[src]

impl From<[u16; 8]> for IpAddr[src]

fn from(segments: [u16; 8]) -> IpAddr[src]

Creates an IpAddr::V6 from an eight element 16-bit array.

impl From<[u8; 16]> for IpAddr[src]

fn from(octets: [u8; 16]) -> IpAddr[src]

Creates an IpAddr::V6 from a sixteen element byte array.

impl From<[u8; 4]> for IpAddr[src]

fn from(octets: [u8; 4]) -> IpAddr[src]

Creates an IpAddr::V4 from a four element byte array.

impl From<Ipv4Addr> for IpAddr[src]

impl From<Ipv6Addr> for IpAddr[src]

fn from(ipv6: Ipv6Addr) -> IpAddr[src]

Copies this address to a new IpAddr::V6.

impl FromStr for IpAddr[src]

type Err = AddrParseError

The associated error which can be returned from parsing.

impl Hash for IpAddr[src]

impl Ord for IpAddr[src]

impl PartialEq<IpAddr> for IpAddr[src]

impl PartialEq<IpAddr> for Ipv4Addr[src]

impl PartialEq<IpAddr> for Ipv6Addr[src]

impl PartialEq<Ipv4Addr> for IpAddr[src]

impl PartialEq<Ipv6Addr> for IpAddr[src]

impl PartialOrd<IpAddr> for IpAddr[src]

impl PartialOrd<IpAddr> for Ipv4Addr[src]

impl PartialOrd<IpAddr> for Ipv6Addr[src]

impl PartialOrd<Ipv4Addr> for IpAddr[src]

impl PartialOrd<Ipv6Addr> for IpAddr[src]

impl StructuralEq for IpAddr[src]

impl StructuralPartialEq for IpAddr[src]

Auto Trait Implementations

impl RefUnwindSafe for IpAddr

impl Send for IpAddr

impl Sync for IpAddr

impl Unpin for IpAddr

impl UnwindSafe for IpAddr

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> 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.