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

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

An IPv4 address.

An IPv6 address.

Methods

impl IpAddr
[src]

Returns [true] for the special 'unspecified' address.

See the documentation for [Ipv4Addr::is_unspecified][IPv4] and [Ipv6Addr::is_unspecified][IPv6] for more details.

Returns [true] if this is a loopback address.

See the documentation for [Ipv4Addr::is_loopback][IPv4] and [Ipv6Addr::is_loopback][IPv6] for more details.

Returns [true] if the address appears to be globally routable.

See the documentation for [Ipv4Addr::is_global][IPv4] and [Ipv6Addr::is_global][IPv6] for more details.

Returns [true] if this is a multicast address.

See the documentation for [Ipv4Addr::is_multicast][IPv4] and [Ipv6Addr::is_multicast][IPv6] for more details.

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

See the documentation for [Ipv4Addr::is_documentation][IPv4] and [Ipv6Addr::is_documentation][IPv6] for more details.

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

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

Trait Implementations

impl Copy for IpAddr
[src]

impl Clone for IpAddr
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for IpAddr
[src]

impl PartialEq for IpAddr
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for IpAddr
[src]

Formats the value using the given formatter. Read more

impl Hash for IpAddr
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialOrd for IpAddr
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for IpAddr
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Display for IpAddr
[src]

Formats the value using the given formatter. Read more

impl From<Ipv4Addr> for IpAddr
[src]

Performs the conversion.

impl From<Ipv6Addr> for IpAddr
[src]

Performs the conversion.

impl PartialEq<Ipv4Addr> for IpAddr
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialEq<IpAddr> for Ipv4Addr
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd<Ipv4Addr> for IpAddr
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialOrd<IpAddr> for Ipv4Addr
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

Performs the conversion.

impl PartialEq<IpAddr> for Ipv6Addr
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialEq<Ipv6Addr> for IpAddr
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd<Ipv6Addr> for IpAddr
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialOrd<IpAddr> for Ipv6Addr
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

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

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

impl FromStr for IpAddr
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Auto Trait Implementations

impl Send for IpAddr

impl Sync for IpAddr