Struct socket_addr::SocketAddrV6 [] [src]

pub struct SocketAddrV6(pub SocketAddrV6);

Utility struct of SocketAddrV6 for hole punching

Methods from Deref<Target=SocketAddrV6>

fn ip(&self) -> &Ipv6Addr
1.0.0

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
1.0.0

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
1.0.0

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
1.0.0

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 Copy for SocketAddrV6
[src]

impl Clone for SocketAddrV6
[src]

fn clone(&self) -> SocketAddrV6

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Hash for SocketAddrV6
[src]

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

Feeds this value into the state given, updating the hasher as necessary.

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

Feeds a slice of this type into the state provided.

impl Eq for SocketAddrV6
[src]

impl PartialEq for SocketAddrV6
[src]

fn eq(&self, __arg_0: &SocketAddrV6) -> bool

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

fn ne(&self, __arg_0: &SocketAddrV6) -> bool

This method tests for !=.

impl Debug for SocketAddrV6
[src]

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

Formats the value using the given formatter.

impl Deref for SocketAddrV6
[src]

type Target = SocketAddrV6

The resulting type after dereferencing

fn deref(&self) -> &SocketAddrV6

The method called to dereference a value

impl Encodable for SocketAddrV6
[src]

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>

impl Decodable for SocketAddrV6
[src]

fn decode<D: Decoder>(d: &mut D) -> Result<SocketAddrV6, D::Error>