[][src]Enum elefren::errors::Error

pub enum Error {
    Api(ApiError),
    Serde(SerdeError),
    UrlEncoded(UrlEncodedError),
    Http(HttpError),
    Io(IoError),
    Url(UrlError),
    ClientIdRequired,
    ClientSecretRequired,
    AccessTokenRequired,
    Client(StatusCode),
    Server(StatusCode),
    MissingField(&'static str),
    TomlSer(TomlSerError),
    TomlDe(TomlDeError),
    HeaderStrError(HeaderStrError),
    HeaderParseError(HeaderParseError),
    Envy(EnvyError),
    SerdeQs(SerdeQsError),
    Other(String),
}

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

UrlEncoded(UrlEncodedError)

Error serializing to url-encoded string

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.

MissingField(&'static str)

MastodonBuilder & AppBuilder error

TomlSer(TomlSerError)

Error serializing to toml

TomlDe(TomlDeError)

Error deserializing from toml

HeaderStrError(HeaderStrError)

Error converting an http header to a string

HeaderParseError(HeaderParseError)

Error parsing the http Link header

Envy(EnvyError)

Error deserializing from the environment

SerdeQs(SerdeQsError)

Error serializing to a query string

Other(String)

Other errors

Trait Implementations

impl From<Error> 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 From<ApiError> for Error[src]

impl From<Error> for Error[src]

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<String> 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

fn type_id(&self) -> TypeId where
    Self: 'static, 
1.34.0
[src]

Gets the TypeId of self

Auto Trait Implementations

impl Send for Error

impl !Sync for Error

Blanket Implementations

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

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

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

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