Enum ErrorKind

Source
#[non_exhaustive]
pub enum ErrorKind {
Show 37 variants NetworkRequest(Error), ReadResponseBody(Error), BuildRequestClient(Error), GithubRequest(Box<Error>), RuntimeJoin(JoinError), ReadFileInput(Error, PathBuf), ReadStdinInput(Error), Utf8(Utf8Error), BuildGithubClient(Box<Error>), InvalidGithubUrl(String), EmptyUrl, ParseUrl(ParseError, String), InvalidFilePath(Uri), InvalidFragment(Uri), InvalidUrlFromPath(PathBuf), UnreachableEmailAddress(Uri, String), InvalidHeader(InvalidHeaderValue), InvalidBase(String, String), InvalidBaseJoin(String), InvalidPathToUri(String), RootDirMustBeAbsolute(PathBuf), UnsupportedUriType(String), InvalidUrlRemap(String), InvalidFile(PathBuf), DirTraversal(Error), InvalidGlobPattern(PatternError), MissingGitHubToken, InsecureURL(Uri), Channel(SendError<InputContent>), InvalidUrlHost, InvalidURI(Uri), InvalidStatusCode(u16), Regex(Error), TooManyRedirects(Error), BasicAuthExtractorError(BasicAuthExtractorError), Cookies(String), StatusCodeSelectorError(StatusCodeSelectorError),
}
Expand description

Kinds of status errors Note: The error messages can change over time, so don’t match on the output

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.
§

NetworkRequest(Error)

Network error while handling request

§

ReadResponseBody(Error)

Cannot read the body of the received response

§

BuildRequestClient(Error)

The network client required for making requests cannot be created

§

GithubRequest(Box<Error>)

Network error while using GitHub API

§

RuntimeJoin(JoinError)

Error while executing a future on the Tokio runtime

§

ReadFileInput(Error, PathBuf)

Error while converting a file to an input

§

ReadStdinInput(Error)

Error while reading stdin as input

§

Utf8(Utf8Error)

Errors which can occur when attempting to interpret a sequence of u8 as a string

§

BuildGithubClient(Box<Error>)

The GitHub client required for making requests cannot be created

§

InvalidGithubUrl(String)

Invalid GitHub URL

§

EmptyUrl

The input is empty and not accepted as a valid URL

§

ParseUrl(ParseError, String)

The given string can not be parsed into a valid URL, e-mail address, or file path

§

InvalidFilePath(Uri)

The given URI cannot be converted to a file path

§

InvalidFragment(Uri)

The given URI cannot be converted to a file path

§

InvalidUrlFromPath(PathBuf)

The given path cannot be converted to a URI

§

UnreachableEmailAddress(Uri, String)

The given mail address is unreachable

§

InvalidHeader(InvalidHeaderValue)

The given header could not be parsed. A possible error when converting a HeaderValue from a string or byte slice.

§

InvalidBase(String, String)

The given string can not be parsed into a valid base URL or base directory

§

InvalidBaseJoin(String)

Cannot join the given text with the base URL

§

InvalidPathToUri(String)

Cannot convert the given path to a URI

§

RootDirMustBeAbsolute(PathBuf)

Root dir must be an absolute path

§

UnsupportedUriType(String)

The given URI type is not supported

§

InvalidUrlRemap(String)

The given input can not be parsed into a valid URI remapping

§

InvalidFile(PathBuf)

The given path does not resolve to a valid file

§

DirTraversal(Error)

Error while traversing an input directory

§

InvalidGlobPattern(PatternError)

The given glob pattern is not valid

§

MissingGitHubToken

The GitHub API could not be called because of a missing GitHub token.

§

InsecureURL(Uri)

Used an insecure URI where a secure variant was reachable

§

Channel(SendError<InputContent>)

Error while sending/receiving messages from MPSC channel

§

InvalidUrlHost

An URL with an invalid host was found

§

InvalidURI(Uri)

Cannot parse the given URI

§

InvalidStatusCode(u16)

The given status code is invalid (not in the range 100-1000)

§

Regex(Error)

Regex error

§

TooManyRedirects(Error)

Too many redirects (HTTP 3xx) were encountered (configurable)

§

BasicAuthExtractorError(BasicAuthExtractorError)

Basic auth extractor error

§

Cookies(String)

Cannot load cookies

§

StatusCodeSelectorError(StatusCodeSelectorError)

Status code selector parse error

Implementations§

Source§

impl ErrorKind

Source

pub fn details(&self) -> Option<String>

Return more details about the given ErrorKind

Which additional information we can extract depends on the underlying request type. The output is purely meant for humans (e.g. for status messages) and future changes are expected.

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, __formatter: &mut Formatter<'_>) -> Result

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

impl Error for ErrorKind

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Box<Error>> for ErrorKind

Source§

fn from(source: Box<Error>) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ErrorKind

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ErrorKind

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ErrorKind

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ErrorKind> for Status

Source§

fn from(e: ErrorKind) -> Self

Converts to this type from the input type.
Source§

impl From<Infallible> for ErrorKind

Source§

fn from(_: Infallible) -> Self

Converts to this type from the input type.
Source§

impl From<InvalidHeaderValue> for ErrorKind

Source§

fn from(source: InvalidHeaderValue) -> Self

Converts to this type from the input type.
Source§

impl From<JoinError> for ErrorKind

Source§

fn from(source: JoinError) -> Self

Converts to this type from the input type.
Source§

impl From<PatternError> for ErrorKind

Source§

fn from(source: PatternError) -> Self

Converts to this type from the input type.
Source§

impl From<SendError<InputContent>> for ErrorKind

Source§

fn from(source: SendError<InputContent>) -> Self

Converts to this type from the input type.
Source§

impl From<Utf8Error> for ErrorKind

Source§

fn from(source: Utf8Error) -> Self

Converts to this type from the input type.
Source§

impl Hash for ErrorKind

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ErrorKind

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ErrorKind

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for ErrorKind

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> AsErrorSource for T
where T: Error + 'static,

Source§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method receivers.
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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T