Module error

Source
Expand description

Contains the Error and Result types that mongodb uses.

Structs§

BulkWriteError
An error that occurred while executing bulk_write.
CommandError
An error that occurred due to a database command failing.
Error
An error that can occur in the mongodb crate. The inner ErrorKind is wrapped in an Arc to allow the errors to be cloned.
IndexedWriteError
An individual write error that occurred during an insert_many operation.
InsertManyError
The set of errors that occurred during a call to insert_many.
WriteConcernError
An error that occurred due to not being able to satisfy a write concern.
WriteError
An error that occurred during a write operation that wasn’t due to being unable to satisfy a write concern.

Enums§

ErrorKind
The types of errors that can occur.
GridFsErrorKind
An error that occurred during a GridFS operation.
GridFsFileIdentifier
An identifier for a file stored in a GridFS bucket.
PartialBulkWriteResult
The results of a partially-successful bulk_write operation.
WriteFailure
An error that occurred when trying to execute a write operation.

Constants§

RETRYABLE_WRITE_ERROR
Retryable write error label. This label will be added to an error when the error is write-retryable.
TRANSIENT_TRANSACTION_ERROR
Transient transaction error label. This label will be added to a network error or server selection error that occurs during a transaction.
UNKNOWN_TRANSACTION_COMMIT_RESULT
Unknown transaction commit result error label. This label will be added to a server selection error, network error, write-retryable error, MaxTimeMSExpired error, or write concern failed/timeout during a commitTransaction.

Type Aliases§

Result
The result type for all methods that can return an error in the mongodb crate.