pub enum Error {
Show 21 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),
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.
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.