# Enum std::net::IpAddr [−] [src]

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

An IP address, either an IPv4 or IPv6 address.

## Variants

`V4` | Representation of an IPv4 address.
`V6` | Representation of an IPv6 address.

## Trait Implementations

### `impl Display for IpAddr`

#### `fn fmt(&self, fmt: &mut Formatter) -> Result`

### `impl FromStr for IpAddr`

#### `type Err = AddrParseError`

#### `fn from_str(s: &str) -> Result<IpAddr, AddrParseError>`

### Derived Implementations

### `impl Ord for IpAddr`

#### `fn cmp(&self, __arg_0: &IpAddr) -> Ordering`

### `impl PartialOrd for IpAddr`

#### `fn partial_cmp(&self, __arg_0: &IpAddr) -> Option<Ordering>`

#### `fn lt(&self, __arg_0: &IpAddr) -> bool`

#### `fn le(&self, __arg_0: &IpAddr) -> bool`

#### `fn gt(&self, __arg_0: &IpAddr) -> bool`

#### `fn ge(&self, __arg_0: &IpAddr) -> bool`

### `impl Hash for IpAddr`

#### `fn hash<__H: Hasher>(&self, __arg_0: &mut __H)`

#### `fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher`

### `impl Debug for IpAddr`

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`

### `impl PartialEq for IpAddr`

#### `fn eq(&self, __arg_0: &IpAddr) -> bool`

#### `fn ne(&self, __arg_0: &IpAddr) -> bool`

### `impl Eq for IpAddr`

### `impl Clone for IpAddr`

#### `fn clone(&self) -> IpAddr`

#### `fn clone_from(&mut self, source: &Self)`

### `impl Copy for IpAddr`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize`)