Enum tor_dirclient::Error
source ·
[−]#[non_exhaustive]
pub enum Error {
CompressionBomb,
DirTimeout,
TruncatedHeaders,
HttpStatus(Option<u16>),
ResponseTooLong(usize),
Utf8Encoding(FromUtf8Error),
IoError(Error),
Proto(Error),
CircMgr(Error),
HttparseError(Error),
HttpError(Error),
ContentEncoding(String),
}Expand description
An error originating from the tor-dirclient crate.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
CompressionBomb
We received an object with a suspiciously good compression ratio
DirTimeout
The directory cache took too long to reply to us.
TruncatedHeaders
We got an EOF before we were done with the headers.
HttpStatus(Option<u16>)
Got an HTTP status other than 200
ResponseTooLong(usize)
Tuple Fields
0: usizeReceived a response that was longer than we expected.
Utf8Encoding(FromUtf8Error)
Tuple Fields
Data received was not UTF-8 encoded.
IoError(Error)
Tuple Fields
0: ErrorIo error while reading on connection
Proto(Error)
Tuple Fields
0: ErrorA protocol error while launching a stream
CircMgr(Error)
Tuple Fields
0: ErrorError while getting a circuit
HttparseError(Error)
Tuple Fields
0: ErrorError when parsing http
HttpError(Error)
Tuple Fields
0: ErrorError while creating http request
ContentEncoding(String)
Tuple Fields
0: StringUnrecognized content-encoding
Implementations
Return true if this error means that the circuit shouldn’t be used for any more directory requests.
Trait Implementations
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
