[−][src]Enum shadowsocks::relay::socks5::Address
SOCKS5 address type
Variants
SocketAddress(SocketAddr)
Socket address (IP Address)
Domain name address
Implementations
impl Address
[src]
pub async fn read_from<R, '_>(stream: &'_ mut R) -> Result<Address, Error> where
R: AsyncRead + Unpin,
[src]
R: AsyncRead + Unpin,
Parse from a AsyncRead
pub async fn write_to<W, '_, '_>(&'_ self, writer: &'_ mut W) -> Result<()> where
W: AsyncWrite + Unpin,
[src]
W: AsyncWrite + Unpin,
Writes to writer
pub fn write_to_buf<B: BufMut>(&self, buf: &mut B)
[src]
Writes to buffer
pub fn serialized_len(&self) -> usize
[src]
Get required buffer size for serializing
pub fn port(&self) -> u16
[src]
Get associated port number
pub fn host(&self) -> String
[src]
Get host address string
Trait Implementations
impl Clone for Address
[src]
impl Debug for Address
[src]
impl Display for Address
[src]
impl Eq for Address
[src]
impl<'_> From<&'_ Address> for Address
[src]
impl From<(String, u16)> for Address
[src]
impl From<Address> for Address
[src]
impl From<SocketAddr> for Address
[src]
fn from(s: SocketAddr) -> Address
[src]
impl FromStr for Address
[src]
type Err = AddressError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Address, AddressError>
[src]
impl Hash for Address
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Address> for Address
[src]
impl StructuralEq for Address
[src]
impl StructuralPartialEq 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>>
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,