Enum gitlab::api::ApiError [−][src]
#[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, }, }
Expand description
Errors which may occur when using API endpoints.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
The client encountered an error.
The URL failed to parse.
Show fields
Fields of UrlParse
source: ParseError
The source of the error.
Body data could not be created.
Show fields
Fields of Body
source: BodyError
The source of the error.
JSON deserialization from GitLab failed.
Show fields
Fields of Json
source: Error
The source of the error.
GitLab returned an error message.
Show fields
Fields of Gitlab
msg: String
The error message from GitLab.
GitLab returned an error object.
Show fields
Fields of GitlabObject
obj: Value
The error object from GitLab.
GitLab returned an HTTP error with JSON we did not recognize.
Show fields
Fields of GitlabUnrecognized
obj: Value
The full object from GitLab.
Failed to parse an expected data type from JSON.
Show fields
An error with pagination occurred.
Show fields
Fields of Pagination
source: PaginationError
The source of the error.
Implementations
Trait Implementations
impl<E> Error for ApiError<E> where
E: Error + Send + Sync + 'static,
[src]
impl<E> Error for ApiError<E> where
E: Error + Send + Sync + 'static,
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl From<ApiError<RestError>> for GitlabError
[src]
impl From<ApiError<RestError>> for GitlabError
[src]impl<E> From<PaginationError> for ApiError<E> where
E: Error + Send + Sync + 'static,
[src]
impl<E> From<PaginationError> for ApiError<E> where
E: Error + Send + Sync + 'static,
[src]fn from(source: PaginationError) -> Self
[src]
fn from(source: PaginationError) -> Self
[src]Performs the conversion.
impl<E> From<ParseError> for ApiError<E> where
E: Error + Send + Sync + 'static,
[src]
impl<E> From<ParseError> for ApiError<E> where
E: Error + Send + Sync + 'static,
[src]fn from(source: ParseError) -> Self
[src]
fn from(source: ParseError) -> Self
[src]Performs the conversion.
Auto Trait Implementations
impl<E> !RefUnwindSafe for ApiError<E>
impl<E> Send for ApiError<E>
impl<E> Sync for ApiError<E>
impl<E> Unpin for ApiError<E> where
E: Unpin,
E: Unpin,
impl<E> !UnwindSafe for ApiError<E>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]