pub struct SocksStatus(u8);
Expand description
Possible reply status values from a SOCKS5 handshake.
Note that the documentation for these values is kind of scant, and is limited to what the RFC says. Note also that SOCKS4 only represents success and failure.
Tuple Fields§
§0: u8
Implementations§
Source§impl SocksStatus
impl SocksStatus
Sourcepub const SUCCEEDED: SocksStatus
pub const SUCCEEDED: SocksStatus
RFC 1928: “succeeded”
Sourcepub const GENERAL_FAILURE: SocksStatus
pub const GENERAL_FAILURE: SocksStatus
RFC 1928: “general SOCKS server failure”
Sourcepub const NOT_ALLOWED: SocksStatus
pub const NOT_ALLOWED: SocksStatus
RFC 1928: “connection not allowable by ruleset”
(This is the only occurrence of ‘ruleset’ or even ‘rule’ in RFC 1928.)
Sourcepub const NETWORK_UNREACHABLE: SocksStatus
pub const NETWORK_UNREACHABLE: SocksStatus
RFC 1928: “Network unreachable”
Sourcepub const HOST_UNREACHABLE: SocksStatus
pub const HOST_UNREACHABLE: SocksStatus
RFC 1928: “Host unreachable”
Sourcepub const CONNECTION_REFUSED: SocksStatus
pub const CONNECTION_REFUSED: SocksStatus
RFC 1928: “Connection refused”
Sourcepub const TTL_EXPIRED: SocksStatus
pub const TTL_EXPIRED: SocksStatus
RFC 1928: “TTL expired”
(This is the only occurrence of ‘TTL’ in RFC 1928.)
Sourcepub const COMMAND_NOT_SUPPORTED: SocksStatus
pub const COMMAND_NOT_SUPPORTED: SocksStatus
RFC 1929: “Command not supported”
Sourcepub const ADDRTYPE_NOT_SUPPORTED: SocksStatus
pub const ADDRTYPE_NOT_SUPPORTED: SocksStatus
RFC 1929: “Address type not supported”
Sourcepub const HS_DESC_NOT_FOUND: SocksStatus
pub const HS_DESC_NOT_FOUND: SocksStatus
Prop304: “Onion Service Descriptor Can Not be Found”
Sourcepub const HS_DESC_INVALID: SocksStatus
pub const HS_DESC_INVALID: SocksStatus
Prop304: “Onion Service Descriptor Is Invalid”
Sourcepub const HS_INTRO_FAILED: SocksStatus
pub const HS_INTRO_FAILED: SocksStatus
Prop304: “Onion Service Introduction Failed”
Sourcepub const HS_REND_FAILED: SocksStatus
pub const HS_REND_FAILED: SocksStatus
Prop304: “Onion Service Rendezvous Failed”
Sourcepub const HS_MISSING_CLIENT_AUTH: SocksStatus
pub const HS_MISSING_CLIENT_AUTH: SocksStatus
Prop304: “Onion Service Missing Client Authorization”
Sourcepub const HS_WRONG_CLIENT_AUTH: SocksStatus
pub const HS_WRONG_CLIENT_AUTH: SocksStatus
Prop304: “Onion Service Wrong Client Authorization”
Sourcepub const HS_BAD_ADDRESS: SocksStatus
pub const HS_BAD_ADDRESS: SocksStatus
“Onion service address is invalid”
(Documented in tor.1
but not yet specified.)
Sourcepub const HS_INTRO_TIMEOUT: SocksStatus
pub const HS_INTRO_TIMEOUT: SocksStatus
“Onion Service Introduction Timed Out”
(Documented in tor.1
but not yet specified.)
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 SocksStatus
impl SocksStatus
Sourcepub(crate) fn into_socks4_status(self) -> u8
Available on crate feature proxy-handshake
only.
pub(crate) fn into_socks4_status(self) -> u8
proxy-handshake
only.Convert this status into a value for use with SOCKS4 or SOCKS4a.
Sourcepub(crate) fn from_socks4_status(status: u8) -> Self
Available on crate feature client-handshake
only.
pub(crate) fn from_socks4_status(status: u8) -> Self
client-handshake
only.Create a status from a SOCKS4 or SOCKS4a reply code.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for SocksStatus
impl<'arbitrary> Arbitrary<'arbitrary> for SocksStatus
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
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>
Self
from the entirety of the given
unstructured data. Read moreSource§impl Clone for SocksStatus
impl Clone for SocksStatus
Source§fn clone(&self) -> SocksStatus
fn clone(&self) -> SocksStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SocksStatus
impl Debug for SocksStatus
Source§impl Display for SocksStatus
impl Display for SocksStatus
Source§impl From<SocksStatus> for u8
impl From<SocksStatus> for u8
Source§fn from(val: SocksStatus) -> u8
fn from(val: SocksStatus) -> u8
Source§impl From<u8> for SocksStatus
impl From<u8> for SocksStatus
Source§fn from(num: u8) -> SocksStatus
fn from(num: u8) -> SocksStatus
Source§impl PartialEq for SocksStatus
impl PartialEq for SocksStatus
impl Copy for SocksStatus
impl Eq for SocksStatus
impl StructuralPartialEq for SocksStatus
Auto Trait Implementations§
impl Freeze for SocksStatus
impl RefUnwindSafe for SocksStatus
impl Send for SocksStatus
impl Sync for SocksStatus
impl Unpin for SocksStatus
impl UnwindSafe for SocksStatus
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
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
§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
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>
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>
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