Enum socks5_impl::protocol::Address
source · pub enum Address {
SocketAddress(SocketAddr),
DomainAddress(String, u16),
}
Expand description
SOCKS5 Adderss Format
+------+----------+----------+
| ATYP | DST.ADDR | DST.PORT |
+------+----------+----------+
| 1 | Variable | 2 |
+------+----------+----------+
Variants§
SocketAddress(SocketAddr)
DomainAddress(String, u16)
Implementations§
Trait Implementations§
source§impl AsyncStreamOperation for Address
impl AsyncStreamOperation for Address
fn retrieve_from_async_stream<'life0, 'async_trait, R>( stream: &'life0 mut R, ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
fn write_to_async_stream<'life0, 'life1, 'async_trait, W>(
&'life0 self,
w: &'life1 mut W,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
W: AsyncWrite + Unpin + Send + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
source§impl From<&SocketAddr> for Address
impl From<&SocketAddr> for Address
source§fn from(addr: &SocketAddr) -> Self
fn from(addr: &SocketAddr) -> Self
Converts to this type from the input type.
source§impl From<SocketAddr> for Address
impl From<SocketAddr> for Address
source§fn from(addr: SocketAddr) -> Self
fn from(addr: SocketAddr) -> Self
Converts to this type from the input type.
source§impl Ord for Address
impl Ord for Address
source§impl PartialEq for Address
impl PartialEq for Address
source§impl PartialOrd for Address
impl PartialOrd for Address
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl StreamOperation for Address
impl StreamOperation for Address
source§impl ToSocketAddrs for Address
impl ToSocketAddrs for Address
§type Iter = IntoIter<SocketAddr>
type Iter = IntoIter<SocketAddr>
Returned iterator over socket addresses which this type may correspond
to.
source§fn to_socket_addrs(&self) -> Result<Self::Iter>
fn to_socket_addrs(&self) -> Result<Self::Iter>
Converts this object to an iterator of resolved
SocketAddr
s. Read moresource§impl TryFrom<&Address> for SocketAddr
impl TryFrom<&Address> for SocketAddr
source§impl TryFrom<Address> for SocketAddr
impl TryFrom<Address> for SocketAddr
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more