Struct socket_addr::SocketAddr
[−]
[src]
pub struct SocketAddr(pub SocketAddr);
Wrapper around std::net::SocketAddr
to enable it to encoded and decoded.
Methods
impl SocketAddr
[src]
Methods from Deref<Target=SocketAddr>
fn ip(&self) -> IpAddr
1.7.0
Returns the IP address associated with this socket address.
fn set_ip(&mut self, new_ip: IpAddr)
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.
Trait Implementations
impl PartialEq for SocketAddr
[src]
fn eq(&self, __arg_0: &SocketAddr) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SocketAddr) -> bool
This method tests for !=
.
impl Eq for SocketAddr
[src]
impl Hash for SocketAddr
[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 Debug for SocketAddr
[src]
impl Clone for SocketAddr
[src]
fn clone(&self) -> SocketAddr
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 Copy for SocketAddr
[src]
impl Deref for SocketAddr
[src]
type Target = SocketAddr
The resulting type after dereferencing
fn deref(&self) -> &SocketAddr
The method called to dereference a value