pub enum ErrorKind {
JsonTranscoding,
BsonEncoding,
BsonDecoding,
BsonNumberRepr,
MissingDocumentField,
IllTypedDocumentField,
MissingId,
ObjectIdGeneration,
MongoDbError,
MongoDbWriteException,
MongoDbBulkWriteException,
IntConversionUnderflow,
IntConversionOverflow,
BsonSchema,
}
A structured, "machine-readable" error kind.
There was an error converting between JSON and a strongly-typed value.
There was an error converting a strongly-typed value to BSON.
There was an error converting BSON to a strongly-typed value.
This numerical value can't be represented in BSON (because,
for example, it exceeds the range of i64
)
A field with the specified key was not found in the BSON document.
A field with the specified key was found in the BSON document,
but it was of an unexpected type.
One or more ID fields (e.g. _id
in an entity document or
inserted_id
in a MongoDB response) could not be found.
An ObjectId
could not be generated.
An error that comes from the MongoDB driver.
An error coming from MongoDB, related to a single write operation.
An error coming from MongoDB, related to a bulk write operation.
An attempt was made to convert a negative integer to a usize
.
An attempt was made to convert an integer that is too big to a usize
.
There was an error in the BSON schema for a type.
Returns a human-readable error description for this kind.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
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
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
impl<T, U> TryInto for T where U: TryFrom<T>, | |
type Err = <U as TryFrom<T>>::Err