Enum ErrorKind

Source
pub enum ErrorKind {
Show 14 variants ProviderNotFound(String), InvalidInput(String), NotBehindProxy, WrongRequestKind, InvalidHexChar(char), InvalidHexLength, BrokenChannel, PoisonedLock, ThreadCrashed, IoError(Error), JsonError(Error), AddrParseError(AddrParseError), ParseIntError(ParseIntError), GenericError(Box<dyn StdError + Send + Sync>), // some variants omitted
}
Expand description

This enum represents the kind of error that occured, with the details about it.

Variants§

§

ProviderNotFound(String)

The provider requested by an hook doesn’t exist. The provider name is provided as the first parameter.

§

InvalidInput(String)

The input you provided was invalid. A more detailed error message is available in the first parameter.

§

NotBehindProxy

The current request didn’t travel across the configured number of proxies. This means the request was forged or the server is misconfigured.

§

WrongRequestKind

The current request isn’t of the required kind.

§

InvalidHexChar(char)

The character is not valid hex. The character is available in the first parameter.

§

InvalidHexLength

The hex string has the wrong length.

§

BrokenChannel

An internal communication channel is broken.

§

PoisonedLock

An internal lock is poisoned, probably due to a thread crash.

§

ThreadCrashed

An internal thread crashed.

§

IoError(Error)

An error occured while performing I/O operations. The underlying error is available as the first parameter.

§

JsonError(Error)

An error occured while parsing some JSON. The underlying error is available as the first parameter.

§

AddrParseError(AddrParseError)

An error occured while parsing an IP address. The underlying error is available as the first parameter.

§

ParseIntError(ParseIntError)

An error occured while parsing a number. The underlying error is available as the first parameter.

§

GenericError(Box<dyn StdError + Send + Sync>)

A generic error, without a defined type

Trait Implementations§

Source§

impl Debug for ErrorKind

Source§

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

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

impl Display for ErrorKind

Source§

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

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

impl From<ErrorKind> for Error

Source§

fn from(error: ErrorKind) -> Self

Converts to this type from the input type.

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, 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> ToString for T
where T: Display + ?Sized,

Source§

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>,

Source§

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>,

Source§

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.