Enum socks5_impl::protocol::Address
source · pub enum Address {
SocketAddress(SocketAddr),
DomainAddress(String, u16),
}
Variants§
SocketAddress(SocketAddr)
DomainAddress(String, u16)
Implementations§
source§impl Address
impl Address
pub fn unspecified() -> Self
pub fn port(&self) -> u16
pub fn domain(&self) -> String
pub async fn addr_data_from_stream<R: AsyncRead + Unpin>( stream: &mut R ) -> Result<Vec<u8>>
pub fn from_data(data: &[u8]) -> Result<Self>
pub async fn from_stream<R: AsyncRead + Unpin>(stream: &mut R) -> Result<Self>
pub fn write_to_buf<B: BufMut>(&self, buf: &mut B)
pub fn serialized_len(&self) -> usize
pub const fn max_serialized_len() -> usize
Trait Implementations§
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<Address> for Address
impl PartialEq<Address> for Address
source§impl PartialOrd<Address> for Address
impl PartialOrd<Address> 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 TryFrom<Address> for SocketAddr
impl TryFrom<Address> for SocketAddr
impl Eq for Address
impl StructuralEq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
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