Enum tor_socksproto::Error
source · [−]#[non_exhaustive]
pub enum Error {
Syntax,
Decode(Error),
BadProtocol(u8),
NotImplemented,
AlreadyFinished(Bug),
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
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.
Bug(Bug)
The program (perhaps this module, perhaps Arti, perhaps the caller) is buggy
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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