pub enum Error {
Show 23 variants Crypto(String), EnvVar(VarError), FromUtf8(FromUtf8Error), FromUtf8Str(Utf8Error), HexDecode(DecodeError), Http(Error), HttpRetry(String), InputTooBig(String), Internal(String), InvalidArgument(String), Io(Error), Json(Error), MsgDecode(Error), MsgEncode(Error), NotFound(String), Nul(NulError), ParseInt(ParseIntError), ParseIpAddr(AddrParseError), Precondition(String), Regex(Error), SetLogger(SetLoggerError), StringParse(ParseError), Url(ParseError),
}
Expand description

Error is a structure which denotes all of the possible kinds of errors bdrck can produce, including errors from any of its underlying dependencies.

Variants

Crypto(String)

An error encountered while performing a cryptographic operation.

EnvVar(VarError)

An error encountered while trying to interact with environment variables.

FromUtf8(FromUtf8Error)

An error decoding bytes as UTF-8 text.

FromUtf8Str(Utf8Error)

An error decoding bytes as UTF-8 text (except for str instead of String).

HexDecode(DecodeError)

An error encountered in trying to decode a hex string to the bytes it represents.

Http(Error)

An error originating in HTTP client code.

HttpRetry(String)

An HTTP request failed, despite multiple retries.

InputTooBig(String)

This error indicates that we were reading some input, and we encountered too many bytes (e.g. because there was an upper bound on how much we were willing to read).

Internal(String)

An internal unrecoverable error, usually due to some underlying library.

InvalidArgument(String)

Errors akin to EINVAL - essentially, an argument passed into a function was invalid in some way..

Io(Error)

An I/O error, generally encountered when interacting with the filesystem.

Json(Error)

An error encountered while serializing or deserializing JSON.

MsgDecode(Error)

An error encountered when decoding a serialized message.

MsgEncode(Error)

An error encountered when encoding a struct to a serialized message.

NotFound(String)

Errors akin to ENOENT - something like e.g. “file not found”, although this is not necessarily always about files.

Nul(NulError)

An error where some data returned by an underlying library call contained a NUL byte (‘\0’), in a context where such a thing is invalid.

ParseInt(ParseIntError)

An error encountered when trying to parse an integer from a string.

ParseIpAddr(AddrParseError)

An error encountered when trying to parse an IP address from a string.

Precondition(String)

A precondition error, which basically amounts to a function being called when one or more of its preconditions were not satisfied.

Regex(Error)

An error encountered in either parsing or applying a regular expression.

SetLogger(SetLoggerError)

An error encountered when attempting to set the global Logger implementation.

StringParse(ParseError)

An awkward hack; this error exists to use String’s FromStr impl, but this operation won’t actually ever fail.

Url(ParseError)

An error in decoding a URL.

Trait Implementations

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
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