[][src]Enum urban_rs::UrbanError

pub enum UrbanError {
    ReqwestError(Error),
    SerdeError(Error),
    UnknownJsonError,
}

Errors for the library.

There are many different types of errors that can arise when calling for definitions. Like a reqwest error in case it can't access the online API, or a serde_json error when there's an error in json parsing.

For this reason all the different possible errors are encapsulated under the UrbanError enum.

Variants

ReqwestError(Error)

Produced when reqwest fails.

SerdeError(Error)

Produced when serde fails.

UnknownJsonError

Error produced when the Json received from Urban's API has an unexpected structure.

If a function returns this error. It means that it has correctly been able to fetch and recieve the Json from Urban's API. But it doesn't have the expected structure of a definition.

Trait Implementations

impl Debug for UrbanError[src]

impl Display for UrbanError[src]

impl Error for UrbanError[src]

impl From<Error> for UrbanError[src]

impl From<Error> for UrbanError[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[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.