[][src]Enum mammut::Error

pub enum Error {
    Api(ApiError),
    Serde(SerdeError),
    Http(HttpError),
    Io(IoError),
    Url(UrlError),
    ClientIdRequired,
    ClientSecretRequired,
    AccessTokenRequired,
    Client(StatusCode),
    Server(StatusCode),
    Header(HeaderToStrError),
    Hyperx(HyperxError),
}

enum of possible errors encountered using the mastodon API.

Variants

Api(ApiError)

Error from the Mastodon API. This typically means something went wrong with your authentication or data.

Serde(SerdeError)

Error deserialising to json. Typically represents a breaking change in the Mastodon API

Http(HttpError)

Error encountered in the HTTP backend while requesting a route.

Io(IoError)

Wrapper around the std::io::Error struct.

Url(UrlError)

Wrapper around the url::ParseError struct.

ClientIdRequired

Missing Client Id.

ClientSecretRequired

Missing Client Secret.

AccessTokenRequired

Missing Access Token.

Client(StatusCode)

Generic client error.

Server(StatusCode)

Generic server error.

Header(HeaderToStrError)

A possible error when converting a HeaderValue to a string representation.

Hyperx(HyperxError)

Errors while parsing headers and associated types.

Trait Implementations

impl From<Error> for Error[src]

impl From<ToStrError> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<ParseError> for Error[src]

impl Display for Error[src]

impl Debug for Error[src]

impl Error for Error[src]

fn cause(&self) -> Option<&dyn Error>1.0.0[src]

Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

The lower-level cause of this error, if any. Read more

fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]

The lower-level source of this error, if any. Read more

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

Auto Trait Implementations

impl Send for Error

impl Unpin for Error

impl Sync for Error

impl !UnwindSafe for Error

impl !RefUnwindSafe for Error

Blanket Implementations

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.

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

impl<T> BorrowMut<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<T> Erased for T

impl<E> Fail for E where
    E: 'static + Error + Send + Sync

fn name(&self) -> Option<&str>

Returns the "name" of the error. Read more

fn cause(&self) -> Option<&(dyn Fail + 'static)>

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

fn backtrace(&self) -> Option<&Backtrace>

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

fn context<D>(self, context: D) -> Context<D> where
    D: Display + Send + Sync + 'static, 

Provides context for this failure. Read more

fn compat(self) -> Compat<Self>

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

impl<T> AsFail for T where
    T: Fail, 

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

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