pub enum Error {
    Io {
        kind: IoErrorKind,
        message: String,
    },
    Protocol(Cow<'static, str>),
    Encoding(Cow<'static, str>),
    Conversion(Cow<'static, str>),
    Utf8,
    Utf16,
    ParseInt(ParseIntError),
    Server(TokenError),
    Tls(String),
    Gssapi(String),
    Routing {
        host: String,
        port: u16,
    },
    BulkInput(Cow<'static, str>),
}
Expand description

A unified error enum that contains several errors that might occurr during the lifecycle of this driver

Variants

Io

Fields

kind: IoErrorKind

A list specifying general categories of I/O error.

message: String

The error description.

An error occured when performing I/O to the server.

Protocol(Cow<'static, str>)

An error happened during the request or response parsing.

Encoding(Cow<'static, str>)

Server responded with encoding not supported.

Conversion(Cow<'static, str>)

Conversion failure from one type to another.

Utf8

Tried to convert data to UTF-8 that was not valid.

Utf16

Tried to convert data to UTF-16 that was not valid.

ParseInt(ParseIntError)

Tried to parse an integer that was not an integer.

Server(TokenError)

An error returned by the server.

Tls(String)

An error in the TLS handshake.

Gssapi(String)

Available on Unix and crate feature integrated-auth-gssapi only.

An error from the GSSAPI library.

Routing

Fields

host: String

The requested hostname

port: u16

The requested port.

Server requested a connection to an alternative address.

BulkInput(Cow<'static, str>)

Invalid input in Bulk Upload

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. 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

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.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. 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