std.net.socket.SocketAddress
class pub SocketAddressAn IPv4 or IPv6 socket address.
Fields
ip
let pub @ip: IpAddressThe IPv4/IPv6 address of this socket address.
port
let pub @port: IntThe port number of this socket address.
Instance methods
!=
Show source codeHide source code
fn pub !=(other: T) -> Bool {
(self == other).false?
}fn pub !=(other: T) -> BoolReturns true if self and the given object are not equal to each other.
==
Show source codeHide source code
fn pub ==(other: ref SocketAddress) -> Bool {
@ip == other.ip and @port == other.port
}fn pub ==(other: ref SocketAddress) -> BoolReturns true if self and other are the same.
fmt
Show source codeHide source code
fn pub fmt(formatter: mut Formatter) {
formatter.write('${@ip}:${@port}')
}fn pub fmt(formatter: mut Formatter)Formats self in a human-readable format for debugging purposes.
Implemented traits
Equal
impl Equal[ref SocketAddress] for SocketAddressFormat
impl Format for SocketAddress