[][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) -> bool
1.0.0
[src]

This method tests for !=.

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 Copy for ErrorKind
[src]

impl Display for ErrorKind
[src]

impl Debug for ErrorKind
[src]

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<'de> Deserialize<'de> for ErrorKind
[src]

impl Serialize for ErrorKind
[src]

Auto Trait Implementations

impl Send for ErrorKind

impl Sync for ErrorKind

Blanket Implementations

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

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

type Owned = T

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

impl<T> Same for T

type Output = T

Should always be Self