pub enum ApiError<T> {
BadRequest(T),
Unauthorized(T),
Forbidden(T),
NotFound(T),
InternalServerError(T),
}Variants§
Implementations§
Source§impl<T> ApiError<T>
impl<T> ApiError<T>
pub fn into_inner(self) -> T
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for ApiError<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ApiError<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> Error for ApiError<T>where
T: Debug,
impl<T> Error for ApiError<T>where
T: Debug,
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<T> Freeze for ApiError<T>where
T: Freeze,
impl<T> RefUnwindSafe for ApiError<T>where
T: RefUnwindSafe,
impl<T> Send for ApiError<T>where
T: Send,
impl<T> Sync for ApiError<T>where
T: Sync,
impl<T> Unpin for ApiError<T>where
T: Unpin,
impl<T> UnwindSafe for ApiError<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more