Enum tor_socksproto::SocksAuth
source · #[non_exhaustive]pub enum SocksAuth {
NoAuth,
Socks4(Vec<u8>),
Username(Vec<u8>, Vec<u8>),
}
Expand description
Provided authentication from a SOCKS handshake
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoAuth
No authentication was provided
Socks4(Vec<u8>)
Socks4 authentication (a string) was provided.
Username(Vec<u8>, Vec<u8>)
Socks5 username/password authentication was provided.
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for SocksAuth
impl<'arbitrary> Arbitrary<'arbitrary> for SocksAuth
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl PartialEq for SocksAuth
impl PartialEq for SocksAuth
impl Eq for SocksAuth
impl StructuralPartialEq for SocksAuth
Auto Trait Implementations§
impl Freeze for SocksAuth
impl RefUnwindSafe for SocksAuth
impl Send for SocksAuth
impl Sync for SocksAuth
impl Unpin for SocksAuth
impl UnwindSafe for SocksAuth
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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