Enum mongodb::error::ErrorKind[][src]

#[non_exhaustive]pub enum ErrorKind {
    AddrParse(AddrParseError),
    ArgumentError {
        message: String,
    },
    AuthenticationError {
        message: String,
    },
    BsonDecode(Error),
    BsonEncode(Error),
    BulkWriteError(BulkWriteFailure),
    CommandError(CommandError),
    DnsResolve(ResolveError),
    InternalError {
        message: String,
    },
    InvalidDnsName(InvalidDNSNameError),
    InvalidHostname {
        hostname: String,
    },
    Io(Error),
    NoDnsResults(StreamAddress),
    OperationError {
        message: String,
    },
    OutOfRangeError(OutOfRangeError),
    ParseError {
        data_type: String,
        file_path: String,
    },
    ConnectionPoolClearedError {
        message: String,
    },
    ResponseError {
        message: String,
    },
    ServerSelectionError {
        message: String,
    },
    SrvLookupError {
        message: String,
    },
    TokioTimeoutElapsed(Elapsed),
    RustlsConfig(TLSError),
    TxtLookupError {
        message: String,
    },
    WaitQueueTimeoutError {
        address: StreamAddress,
    },
    WriteError(WriteFailure),
}

The types of errors that can occur.

Variants (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.
AddrParse(AddrParseError)

Wrapper around std::net::AddrParseError.

ArgumentError

An invalid argument was provided to a database operation.

Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of ArgumentError

message: String
AuthenticationError

An error occurred while the Client attempted to authenticate a connection.

Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of AuthenticationError

message: String
BsonDecode(Error)

Wrapper around bson::de::Error.

BsonEncode(Error)

Wrapper around bson::ser::Error.

BulkWriteError(BulkWriteFailure)

An error occurred when trying to execute a write operation consisting of multiple writes.

CommandError(CommandError)

The server returned an error to an attempted operation.

DnsResolve(ResolveError)

Wrapper around trust_dns_resolver::error::ResolveError.

InternalError
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of InternalError

message: String
InvalidDnsName(InvalidDNSNameError)

Wrapper around webpki::InvalidDNSNameError.

InvalidHostname

A hostname could not be parsed.

Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of InvalidHostname

hostname: String
Io(Error)

Wrapper around std::io::Error.

NoDnsResults(StreamAddress)
OperationError

A database operation failed to send or receive a reply.

Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of OperationError

message: String
OutOfRangeError(OutOfRangeError)
ParseError

Data from a file could not be parsed.

Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of ParseError

data_type: Stringfile_path: String
ConnectionPoolClearedError

The connection pool for a server was cleared during operation execution due to a concurrent error, causing the operation to fail.

Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of ConnectionPoolClearedError

message: String
ResponseError

The server returned an invalid reply to a database operation.

Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of ResponseError

message: String
ServerSelectionError

The Client was not able to select a server for the operation.

Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of ServerSelectionError

message: String
SrvLookupError

An error occurred during SRV record lookup.

Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of SrvLookupError

message: String
TokioTimeoutElapsed(Elapsed)

A timeout occurred before a Tokio task could be completed.

RustlsConfig(TLSError)
TxtLookupError

An error occurred during TXT record lookup

Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of TxtLookupError

message: String
WaitQueueTimeoutError

The Client timed out while checking out a connection from connection pool.

Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of WaitQueueTimeoutError

address: StreamAddress
WriteError(WriteFailure)

An error occurred when trying to execute a write operation

Trait Implementations

impl Debug for ErrorKind[src]

impl Display for ErrorKind[src]

impl Error for ErrorKind[src]

impl From<AddrParseError> for ErrorKind[src]

impl From<Elapsed> for ErrorKind[src]

impl From<Error> for ErrorKind[src]

impl From<Error> for ErrorKind[src]

impl From<Error> for ErrorKind[src]

impl From<InvalidDNSNameError> for ErrorKind[src]

impl From<OutOfRangeError> for ErrorKind[src]

impl From<ResolveError> for ErrorKind[src]

impl From<TLSError> for ErrorKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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