pub struct SocksCmd(u8);
Expand description
Command from the socks client telling us what to do.
Tuple Fields§
§0: u8
Implementations§
Source§impl SocksCmd
impl SocksCmd
Sourcepub const UDP_ASSOCIATE: SocksCmd
pub const UDP_ASSOCIATE: SocksCmd
Not supported in Tor.
Sourcepub const RESOLVE_PTR: SocksCmd
pub const RESOLVE_PTR: SocksCmd
Lookup an IP address, return a hostname. (Tor only.)
fn to_str(self) -> Option<&'static str>
Sourcepub fn is_recognized(self) -> bool
pub fn is_recognized(self) -> bool
Return true if this value is one that we recognize.
Source§impl SocksCmd
impl SocksCmd
Sourcefn recognized(self) -> bool
fn recognized(self) -> bool
Return true if this is a supported command.
Sourcefn requires_port(self) -> bool
fn requires_port(self) -> bool
Return true if this is a command for which we require a port.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for SocksCmd
impl<'arbitrary> Arbitrary<'arbitrary> for SocksCmd
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 moreimpl Copy for SocksCmd
impl Eq for SocksCmd
impl StructuralPartialEq for SocksCmd
Auto Trait Implementations§
impl Freeze for SocksCmd
impl RefUnwindSafe for SocksCmd
impl Send for SocksCmd
impl Sync for SocksCmd
impl Unpin for SocksCmd
impl UnwindSafe for SocksCmd
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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