# Struct std::net::SocketAddrV6 1.0.0 [−] [src]

    pub struct SocketAddrV6 {
        // some fields omitted
    }

An IPv6 socket address.

## Methods

### `impl SocketAddrV6`
[src]

#### `fn new(ip: Ipv6Addr, port: u16, flowinfo: u32, scope_id: u32) -> SocketAddrV6`

Creates a new socket address from the ip/port/flowinfo/scope_id components.

#### `fn ip(&self) -> &Ipv6Addr`

Returns the IP address associated with this socket address.

#### `fn set_ip(&mut self, new_ip: Ipv6Addr)`
1.9.0

Change the IP address associated with this socket address.

#### `fn port(&self) -> u16`

Returns the port number associated with this socket address.

#### `fn set_port(&mut self, new_port: u16)`
1.9.0

Change the port number associated with this socket address.

#### `fn flowinfo(&self) -> u32`

Returns the flow information associated with this address, corresponding to the `sin6_flowinfo` field in C.

#### `fn set_flowinfo(&mut self, new_flowinfo: u32)`
1.9.0

Change the flow information associated with this socket address.

#### `fn scope_id(&self) -> u32`

Returns the scope ID associated with this address, corresponding to the `sin6_scope_id` field in C.

#### `fn set_scope_id(&mut self, new_scope_id: u32)`
1.9.0

Change the scope ID associated with this socket address.

## Trait Implementations

### `impl Display for SocketAddrV6`
[src]

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

### `impl Debug for SocketAddrV6`
[src]

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

### `impl Clone for SocketAddrV6`
[src]

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

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

### `impl PartialEq for SocketAddrV6`
[src]

#### `fn eq(&self, other: &SocketAddrV6) -> bool`

#### `fn ne(&self, other: &Rhs) -> bool`

### `impl Eq for SocketAddrV6`
[src]

### `impl Hash for SocketAddrV6`
[src]

#### `fn hash<H: Hasher>(&self, s: &mut H)`

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

### `impl ToSocketAddrs for SocketAddrV6`
[src]

#### `type Iter = IntoIter<SocketAddr>`

#### `fn to_socket_addrs(&self) -> Result<IntoIter<SocketAddr>>`

### `impl FromStr for SocketAddrV6`
1.5.0
[src]

#### `type Err = AddrParseError`

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

### Derived Implementations

### `impl Copy for SocketAddrV6`
[src]

# 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` or `* -> vec`)