Enum shadowsocks::relay::socks5::Address
[−]
[src]
pub enum Address { SocketAddress(SocketAddr), DomainNameAddress(String, u16), }
SOCKS5 address type
Variants
SocketAddress(SocketAddr)
Socket address (IP Address)
DomainNameAddress(String, u16)
Domain name address
Methods
impl Address
[src]
fn read_from<R: Read + 'static>(stream: R)
-> Box<Future<Item=(R, Address), Error=Error>>
-> Box<Future<Item=(R, Address), Error=Error>>
fn write_to<W: Write + 'static>(self, writer: W) -> BoxIoFuture<W>
fn len(&self) -> usize
Trait Implementations
impl Clone for Address
[src]
fn clone(&self) -> Address
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 PartialEq for Address
[src]
fn eq(&self, __arg_0: &Address) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Address) -> bool
This method tests for !=
.
impl Eq for Address
[src]
impl Hash for Address
[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 Address
[src]
impl Display for Address
[src]
impl ToSocketAddrs for Address
[src]
type Iter = IntoIter<SocketAddr>
Returned iterator over socket addresses which this type may correspond to. Read more
fn to_socket_addrs(&self) -> Result<IntoIter<SocketAddr>>
Converts this object to an iterator of resolved SocketAddr
s. Read more
impl From<SocketAddr> for Address
[src]
fn from(s: SocketAddr) -> Address
Performs the conversion.