[][src]Enum gitlab::api::ApiError

#[non_exhaustive]pub enum ApiError<E> where
    E: Error + Send + Sync + 'static, 
{ Client { source: E, }, UrlParse { source: ParseError, }, Body { source: BodyError, }, Json { source: Error, }, Gitlab { msg: String, }, GitlabObject { obj: Value, }, GitlabUnrecognized { obj: Value, }, DataType { source: Error, typename: &'static str, }, Pagination { source: PaginationError, }, }

Errors which may occur when using API endpoints.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Client

The client encountered an error.

Fields of Client

source: E

The client error.

UrlParse

The URL failed to parse.

Fields of UrlParse

source: ParseError

The source of the error.

Body

Body data could not be created.

Fields of Body

source: BodyError

The source of the error.

Json

JSON deserialization from GitLab failed.

Fields of Json

source: Error

The source of the error.

Gitlab

GitLab returned an error message.

Fields of Gitlab

msg: String

The error message from GitLab.

GitlabObject

GitLab returned an error object.

Fields of GitlabObject

obj: Value

The error object from GitLab.

GitlabUnrecognized

GitLab returned an HTTP error with JSON we did not recognize.

Fields of GitlabUnrecognized

obj: Value

The full object from GitLab.

DataType

Failed to parse an expected data type from JSON.

Fields of DataType

source: Error

The source of the error.

typename: &'static str

The name of the type that could not be deserialized.

Pagination

An error with pagination occurred.

Fields of Pagination

source: PaginationError

The source of the error.

Implementations

impl<E> ApiError<E> where
    E: Error + Send + Sync + 'static, 
[src]

pub fn client(source: E) -> Self[src]

Create an API error in a client error.

Trait Implementations

impl<E: Debug> Debug for ApiError<E> where
    E: Error + Send + Sync + 'static, 
[src]

impl<E> Display for ApiError<E> where
    E: Error + Send + Sync + 'static, 
[src]

impl<E> Error for ApiError<E> where
    E: Error + Send + Sync + 'static, 
[src]

impl From<ApiError<RestError>> for GitlabError[src]

impl<E> From<BodyError> for ApiError<E> where
    E: Error + Send + Sync + 'static, 
[src]

impl<E> From<Error> for ApiError<E> where
    E: Error + Send + Sync + 'static, 
[src]

impl<E> From<PaginationError> for ApiError<E> where
    E: Error + Send + Sync + 'static, 
[src]

impl<E> From<ParseError> for ApiError<E> where
    E: Error + Send + Sync + 'static, 
[src]

Auto Trait Implementations

impl<E> !RefUnwindSafe for ApiError<E>[src]

impl<E> Send for ApiError<E>[src]

impl<E> Sync for ApiError<E>[src]

impl<E> Unpin for ApiError<E> where
    E: Unpin
[src]

impl<E> !UnwindSafe for ApiError<E>[src]

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> Instrument for T[src]

impl<T> Instrument 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.