#[non_exhaustive]
pub enum ErrorKind {
Show 18 variants
InvalidArgument {
message: String,
},
Authentication {
message: String,
},
BsonDeserialization(Error),
BsonSerialization(Error),
BulkWrite(BulkWriteFailure),
Command(CommandError),
DnsResolve {
message: String,
},
Internal {
message: String,
},
Io(Arc<Error>),
ConnectionPoolCleared {
message: String,
},
InvalidResponse {
message: String,
},
ServerSelection {
message: String,
},
SessionsNotSupported,
InvalidTlsConfig {
message: String,
},
Write(WriteFailure),
Transaction {
message: String,
},
IncompatibleServer {
message: String,
},
MissingResumeToken,
}
Expand description
The types of errors that can occur.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
InvalidArgument
Fields
This variant is marked as non-exhaustive
message: String
An invalid argument was provided.
Authentication
Fields
This variant is marked as non-exhaustive
message: String
An error occurred while the Client
attempted to authenticate a
connection.
BsonDeserialization(Error)
Wrapper around bson::de::Error
.
BsonSerialization(Error)
Wrapper around bson::ser::Error
.
BulkWrite(BulkWriteFailure)
An error occurred when trying to execute a write operation consisting of multiple writes.
Command(CommandError)
The server returned an error to an attempted operation.
DnsResolve
Fields
This variant is marked as non-exhaustive
message: String
An error occurred during DNS resolution.
Internal
Fields
This variant is marked as non-exhaustive
message: String
Io(Arc<Error>)
Wrapper around std::io::Error
.
ConnectionPoolCleared
Fields
This variant is marked as non-exhaustive
message: String
The connection pool for a server was cleared during operation execution due to a concurrent error, causing the operation to fail.
InvalidResponse
Fields
This variant is marked as non-exhaustive
message: String
The server returned an invalid reply to a database operation.
ServerSelection
Fields
This variant is marked as non-exhaustive
message: String
The Client was not able to select a server for the operation.
SessionsNotSupported
The Client does not support sessions.
InvalidTlsConfig
Fields
This variant is marked as non-exhaustive
message: String
Write(WriteFailure)
An error occurred when trying to execute a write operation.
Transaction
Fields
This variant is marked as non-exhaustive
message: String
An error occurred during a transaction.
IncompatibleServer
Fields
This variant is marked as non-exhaustive
message: String
The server does not support the operation.
MissingResumeToken
No resume token was present in a change stream document.
Trait Implementations
sourceimpl Error for ErrorKind
impl Error for ErrorKind
1.30.0 · 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
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
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
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