Struct tor_socksproto::SocksStatus
source · [−]pub struct SocksStatus(_);
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.
Implementations
sourceimpl SocksStatus
impl SocksStatus
sourcepub const SUCCEEDED: SocksStatus = SocksStatus(0)
pub const SUCCEEDED: SocksStatus = SocksStatus(0)
RFC 1928: “succeeded”
sourcepub const GENERAL_FAILURE: SocksStatus = SocksStatus(1)
pub const GENERAL_FAILURE: SocksStatus = SocksStatus(1)
RFC 1928: “general SOCKS server failure”
sourcepub const NOT_ALLOWED: SocksStatus = SocksStatus(2)
pub const NOT_ALLOWED: SocksStatus = SocksStatus(2)
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 = SocksStatus(3)
pub const NETWORK_UNREACHABLE: SocksStatus = SocksStatus(3)
RFC 1928: “Network unreachable”
sourcepub const HOST_UNREACHABLE: SocksStatus = SocksStatus(4)
pub const HOST_UNREACHABLE: SocksStatus = SocksStatus(4)
RFC 1928: “Host unreachable”
sourcepub const CONNECTION_REFUSED: SocksStatus = SocksStatus(5)
pub const CONNECTION_REFUSED: SocksStatus = SocksStatus(5)
RFC 1928: “Connection refused”
sourcepub const TTL_EXPIRED: SocksStatus = SocksStatus(6)
pub const TTL_EXPIRED: SocksStatus = SocksStatus(6)
RFC 1928: “TTL expired”
(This is the only occurrence of ‘TTL’ in RFC 1928.)
sourcepub const COMMAND_NOT_SUPPORTED: SocksStatus = SocksStatus(7)
pub const COMMAND_NOT_SUPPORTED: SocksStatus = SocksStatus(7)
RFC 1929: “Command not supported”
sourcepub const ADDRTYPE_NOT_SUPPORTED: SocksStatus = SocksStatus(8)
pub const ADDRTYPE_NOT_SUPPORTED: SocksStatus = SocksStatus(8)
RFC 1929: “Address type not supported”
sourcepub fn is_recognized(self) -> bool
pub fn is_recognized(self) -> bool
Return true if this value is one that we recognize.
Trait Implementations
sourceimpl Clone for SocksStatus
impl Clone for SocksStatus
sourcefn clone(&self) -> SocksStatus
fn clone(&self) -> SocksStatus
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SocksStatus
impl Debug for SocksStatus
sourceimpl Display for SocksStatus
impl Display for SocksStatus
sourceimpl From<SocksStatus> for u8
impl From<SocksStatus> for u8
sourcefn from(val: SocksStatus) -> u8
fn from(val: SocksStatus) -> u8
Converts to this type from the input type.
sourceimpl From<u8> for SocksStatus
impl From<u8> for SocksStatus
sourcefn from(num: u8) -> SocksStatus
fn from(num: u8) -> SocksStatus
Converts to this type from the input type.
sourceimpl PartialEq<SocksStatus> for SocksStatus
impl PartialEq<SocksStatus> for SocksStatus
sourcefn eq(&self, other: &SocksStatus) -> bool
fn eq(&self, other: &SocksStatus) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SocksStatus) -> bool
fn ne(&self, other: &SocksStatus) -> bool
This method tests for !=
.
impl Copy for SocksStatus
impl Eq for SocksStatus
impl StructuralEq for SocksStatus
impl StructuralPartialEq for SocksStatus
Auto Trait Implementations
impl RefUnwindSafe for SocksStatus
impl Send for SocksStatus
impl Sync for SocksStatus
impl Unpin for SocksStatus
impl UnwindSafe for SocksStatus
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more