Enum tor_socksproto::SocksVersion
source · #[non_exhaustive]pub enum SocksVersion {
V4,
V5,
}
Expand description
A supported SOCKS version.
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.
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for SocksVersion
impl<'arbitrary> Arbitrary<'arbitrary> for SocksVersion
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 Clone for SocksVersion
impl Clone for SocksVersion
source§fn clone(&self) -> SocksVersion
fn clone(&self) -> SocksVersion
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SocksVersion
impl Debug for SocksVersion
source§impl PartialEq for SocksVersion
impl PartialEq for SocksVersion
source§fn eq(&self, other: &SocksVersion) -> bool
fn eq(&self, other: &SocksVersion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<u8> for SocksVersion
impl TryFrom<u8> for SocksVersion
impl Copy for SocksVersion
impl Eq for SocksVersion
impl StructuralPartialEq for SocksVersion
Auto Trait Implementations§
impl Freeze for SocksVersion
impl RefUnwindSafe for SocksVersion
impl Send for SocksVersion
impl Sync for SocksVersion
impl Unpin for SocksVersion
impl UnwindSafe for SocksVersion
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