pub enum WebError {
InternalError(String),
BadRequest(String),
NotFound(String),
AnalysisError(AnalysisError),
SerializationError(Error),
}
Expand description
Web API error types
Variants§
InternalError(String)
Internal server error (500)
BadRequest(String)
Bad request error (400)
NotFound(String)
Not found error (404)
AnalysisError(AnalysisError)
Analysis database error
SerializationError(Error)
JSON serialization error
Trait Implementations§
source§impl From<AnalysisError> for WebError
impl From<AnalysisError> for WebError
source§fn from(error: AnalysisError) -> Self
fn from(error: AnalysisError) -> Self
Converts to this type from the input type.
source§impl ResponseError for WebError
impl ResponseError for WebError
source§fn error_response(&self) -> HttpResponse
fn error_response(&self) -> HttpResponse
Creates full response for error. Read more
§fn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Returns appropriate status code for error. Read more
Auto Trait Implementations§
impl Freeze for WebError
impl !RefUnwindSafe for WebError
impl Send for WebError
impl Sync for WebError
impl Unpin for WebError
impl !UnwindSafe for WebError
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