Struct tokio_socks::tcp::socks5::SocksConnector
source · pub struct SocksConnector<'a, 't, S> { /* private fields */ }
Expand description
A Future
which resolves to a socket to the target server through proxy.
Implementations§
source§impl<'a, 't, S> SocksConnector<'a, 't, S>
impl<'a, 't, S> SocksConnector<'a, 't, S>
sourcepub async fn execute(&mut self) -> Result<Socks5Stream<TcpStream>>
pub async fn execute(&mut self) -> Result<Socks5Stream<TcpStream>>
Connect to the proxy server, authenticate and issue the SOCKS command
pub async fn execute_with_socket<T: AsyncSocket + Unpin>( &mut self, socket: T, ) -> Result<Socks5Stream<T>>
Auto Trait Implementations§
impl<'a, 't, S> Freeze for SocksConnector<'a, 't, S>where
S: Freeze,
impl<'a, 't, S> RefUnwindSafe for SocksConnector<'a, 't, S>where
S: RefUnwindSafe,
impl<'a, 't, S> Send for SocksConnector<'a, 't, S>where
S: Send,
impl<'a, 't, S> Sync for SocksConnector<'a, 't, S>where
S: Sync,
impl<'a, 't, S> Unpin for SocksConnector<'a, 't, S>where
S: Unpin,
impl<'a, 't, S> UnwindSafe for SocksConnector<'a, 't, S>where
S: UnwindSafe,
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more