Struct sota::datatype::network::SocketAddr
[−]
[src]
pub struct SocketAddr(pub StdSocketAddr);
Encapsulate a socket address for implementing additional traits.
Methods from Deref<Target=StdSocketAddr>
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 Decodable for SocketAddr
[src]
fn decode<D: Decoder>(d: &mut D) -> Result<SocketAddr, D::Error>
Deserialize a value using a Decoder
.
impl FromStr for SocketAddr
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a string s
to return a value of this type. Read more
impl Deref for SocketAddr
[src]
type Target = StdSocketAddr
The resulting type after dereferencing
fn deref(&self) -> &StdSocketAddr
The method called to dereference a value
impl Display for SocketAddr
[src]
Derived 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 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