[][src]Enum avocado::error::ErrorKind

pub enum ErrorKind {
    JsonTranscoding,
    BsonEncoding,
    BsonDecoding,
    BsonNumberRepr,
    MissingDocumentField,
    IllTypedDocumentField,
    MissingId,
    ObjectIdGeneration,
    MongoDbError,
    MongoDbWriteException,
    MongoDbBulkWriteException,
    IntConversionUnderflow,
    IntConversionOverflow,
    BsonSchema,
}

A structured, "machine-readable" error kind.

Variants

JsonTranscoding

There was an error converting between JSON and a strongly-typed value.

BsonEncoding

There was an error converting a strongly-typed value to BSON.

BsonDecoding

There was an error converting BSON to a strongly-typed value.

BsonNumberRepr

This numerical value can't be represented in BSON (because, for example, it exceeds the range of i64)

MissingDocumentField

A field with the specified key was not found in the BSON document.

IllTypedDocumentField

A field with the specified key was found in the BSON document, but it was of an unexpected type.

MissingId

One or more ID fields (e.g. _id in an entity document or inserted_id in a MongoDB response) could not be found.

ObjectIdGeneration

An ObjectId could not be generated.

MongoDbError

An error that comes from the MongoDB driver.

MongoDbWriteException

An error coming from MongoDB, related to a single write operation.

MongoDbBulkWriteException

An error coming from MongoDB, related to a bulk write operation.

IntConversionUnderflow

An attempt was made to convert a negative integer to a usize.

IntConversionOverflow

An attempt was made to convert an integer that is too big to a usize.

BsonSchema

There was an error in the BSON schema for a type.

Methods

impl ErrorKind[src]

pub fn as_str(self) -> &'static str[src]

Returns a human-readable error description for this kind.

Trait Implementations

impl PartialEq<ErrorKind> for ErrorKind[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Copy for ErrorKind[src]

impl Eq for ErrorKind[src]

impl Clone for ErrorKind[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Hash for ErrorKind[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for ErrorKind[src]

impl Display for ErrorKind[src]

impl<'de> Deserialize<'de> for ErrorKind[src]

impl Serialize for ErrorKind[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> CloneAny for T where
    T: Clone + Any
[src]

impl<T> UnsafeAny for T where
    T: Any