Enum tor_dirclient::Error [−][src]
#[non_exhaustive]
pub enum Error {
CompressionBomb,
DirTimeout,
TruncatedHeaders,
HttpStatus(Option<u16>),
ResponseTooLong(usize),
Utf8Encoding(FromUtf8Error),
IoError(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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
We received an object with a suspiciously good compression ratio
The directory cache took too long to reply to us.
We got an EOF before we were done with the headers.
Got an HTTP status other than 200
ResponseTooLong(usize)Received a response that was longer than we expected.
Utf8Encoding(FromUtf8Error)Data received was not UTF-8 encoded.
IoError(Error)Io error while reading on connection
HttparseError(Error)Error when parsing http
HttpError(Error)Error while creating http request
ContentEncoding(String)Unrecognized 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 Errorimpl !UnwindSafe for Error