Struct tor_socksproto::SocksStatus

source ·
pub struct SocksStatus(/* private fields */);
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§

source§

impl SocksStatus

source

pub const SUCCEEDED: SocksStatus = _

RFC 1928: “succeeded”

source

pub const GENERAL_FAILURE: SocksStatus = _

RFC 1928: “general SOCKS server failure”

source

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.)

source

pub const NETWORK_UNREACHABLE: SocksStatus = _

RFC 1928: “Network unreachable”

source

pub const HOST_UNREACHABLE: SocksStatus = _

RFC 1928: “Host unreachable”

source

pub const CONNECTION_REFUSED: SocksStatus = _

RFC 1928: “Connection refused”

source

pub const TTL_EXPIRED: SocksStatus = _

RFC 1928: “TTL expired”

(This is the only occurrence of ‘TTL’ in RFC 1928.)

source

pub const COMMAND_NOT_SUPPORTED: SocksStatus = _

RFC 1929: “Command not supported”

source

pub const ADDRTYPE_NOT_SUPPORTED: SocksStatus = _

RFC 1929: “Address type not supported”

source

pub const HS_DESC_NOT_FOUND: SocksStatus = _

Prop304: “Onion Service Descriptor Can Not be Found”

source

pub const HS_DESC_INVALID: SocksStatus = _

Prop304: “Onion Service Descriptor Is Invalid”

source

pub const HS_INTRO_FAILED: SocksStatus = _

Prop304: “Onion Service Introduction Failed”

source

pub const HS_REND_FAILED: SocksStatus = _

Prop304: “Onion Service Rendezvous Failed”

source

pub const HS_MISSING_CLIENT_AUTH: SocksStatus = _

Prop304: “Onion Service Missing Client Authorization”

source

pub const HS_WRONG_CLIENT_AUTH: SocksStatus = _

Prop304: “Onion Service Wrong Client Authorization”

source

pub const HS_BAD_ADDRESS: SocksStatus = _

“Onion service address is invalid”

(Documented in tor.1 but not yet specified.)

source

pub const HS_INTRO_TIMEOUT: SocksStatus = _

“Onion Service Introduction Timed Out”

(Documented in tor.1 but not yet specified.)

source

pub fn is_recognized(self) -> bool

Return true if this value is one that we recognize.

source

pub fn from_name(name: &str) -> Option<Self>

Try to convert this value from one of the recognized names.

Trait Implementations§

source§

impl<'arbitrary> Arbitrary<'arbitrary> for SocksStatus

source§

fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the given unstructured data. Read more
source§

fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
source§

impl Clone for SocksStatus

source§

fn clone(&self) -> SocksStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SocksStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for SocksStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SocksStatus> for u8

source§

fn from(val: SocksStatus) -> u8

Converts to this type from the input type.
source§

impl From<u8> for SocksStatus

source§

fn from(num: u8) -> SocksStatus

Converts to this type from the input type.
source§

impl PartialEq for SocksStatus

source§

fn eq(&self, other: &SocksStatus) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for SocksStatus

source§

impl Eq for SocksStatus

source§

impl StructuralPartialEq for SocksStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more