#[non_exhaustive]pub enum Error {
Syntax,
Decode(Error),
BadProtocol(u8),
NotImplemented(Cow<'static, str>),
AlreadyFinished(Bug),
AuthRejected,
MessageTooLong {
limit: usize,
},
UnexpectedEof,
ForbiddenPipelining,
Bug(Bug),
}
Expand description
An error that occurs while negotiating a SOCKS handshake.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Syntax
The SOCKS client didn’t implement SOCKS correctly.
(Or, more likely, we didn’t account for its behavior.)
Decode(Error)
Failed to decode a SOCKS message.
BadProtocol(u8)
The SOCKS client declared a SOCKS version number that isn’t one we support.
In all likelihood, this is somebody trying to use the port for some protocol other than SOCKS.
NotImplemented(Cow<'static, str>)
The SOCKS client tried to use a SOCKS feature that we don’t support at all.
AlreadyFinished(Bug)
Tried to progress the SOCKS handshake when it was already finished. This is a programming error.
AuthRejected
The SOCKS proxy refused our authentication.
MessageTooLong
During the protocol exchange, we needed to handle a handshake bigger than our buffer
UnexpectedEof
Peer closed connection during SOCKS handshake
ForbiddenPipelining
The peer sent payload data too early
The peer sent data after its part of the protocol exchange, without waiting for our side of it to complete, in circumstances where we consider that a protocol violation by the peer.
Returned only by
Finished::into_output_forbid_pipelining
.
Bug(Bug)
The program (perhaps this module, perhaps Arti, perhaps the caller) is buggy
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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<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