Enum tor_socksproto::handshake::proxy::State
source · enum State {
Initial,
Socks5Username,
Socks5Wait,
Done,
Failed,
}
Available on crate feature
proxy-handshake
only.Expand description
Possible state for a Socks connection.
Each completed message advances the state.
Variants§
Initial
Starting state: no messages have been handled yet.
Socks5Username
SOCKS5: we’ve negotiated Username/Password authentication, and are waiting for the client to send it.
Socks5Wait
SOCKS5: we’ve finished the authentication (if any), and we’re waiting for the actual request.
Done
Ending (successful) state: the client has sent all its messages.
(Note that we still need to send a reply.)
Failed
Ending (failed) state: the handshake has failed and cannot continue.
Trait Implementations§
source§impl PartialEq for State
impl PartialEq for State
impl Copy for State
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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