Enum lychee_lib::ErrorKind
source · [−]#[non_exhaustive]
pub enum ErrorKind {
Show 26 variants
RuntimeJoin(JoinError),
ReadFileInput(Error, PathBuf),
ReadStdinInput(Error),
Utf8(Utf8Error),
NetworkRequest(Error),
ReadResponseBody(Error),
BuildRequestClient(Error),
BuildGithubClient(Error),
GithubRequest(Error),
InvalidGithubUrl(String),
ParseUrl(ParseError, String),
InvalidFilePath(Uri),
InvalidUrlFromPath(PathBuf),
UnreachableEmailAddress(Uri, String),
InvalidHeader(InvalidHeaderValue),
InvalidBase(String, String),
InvalidUriRemap(String),
FileNotFound(PathBuf),
DirTraversal(Error),
InvalidGlobPattern(PatternError),
MissingGitHubToken,
InsecureURL(Uri),
Channel(SendError<InputContent>),
InvalidUrlHost,
InvalidURI(Uri),
Regex(Error),
}
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
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
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
BuildGithubClient(Error)
The Github client required for making requests cannot be created
GithubRequest(Error)
Network error while using Github API
InvalidGithubUrl(String)
Invalid Github 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
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
InvalidUriRemap(String)
The given input can not be parsed into a valid URI remapping
FileNotFound(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
Regex(Error)
Regex error
Implementations
Trait Implementations
sourceimpl Error for ErrorKind
impl Error for ErrorKind
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()
sourceimpl From<Infallible> for ErrorKind
impl From<Infallible> for ErrorKind
sourcefn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
sourceimpl From<InvalidHeaderValue> for ErrorKind
impl From<InvalidHeaderValue> for ErrorKind
sourcefn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
Converts to this type from the input type.
sourceimpl From<PatternError> for ErrorKind
impl From<PatternError> for ErrorKind
sourcefn from(source: PatternError) -> Self
fn from(source: PatternError) -> Self
Converts to this type from the input type.
sourceimpl From<SendError<InputContent>> for ErrorKind
impl From<SendError<InputContent>> for ErrorKind
sourcefn from(source: SendError<InputContent>) -> Self
fn from(source: SendError<InputContent>) -> Self
Converts to this type from the input type.
impl Eq for ErrorKind
Auto Trait Implementations
impl !RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl !UnwindSafe for ErrorKind
Blanket Implementations
impl<T> AsErrorSource for T where
T: 'static + Error,
impl<T> AsErrorSource for T where
T: 'static + Error,
fn as_error_source(&self) -> &(dyn Error + 'static)
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. Read more
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
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more