pub enum HTTPError {
BadRequest {
error: String,
},
Forbidden,
NotFound,
InternalServerError {
error: String,
},
}Variants§
Implementations§
Source§impl HTTPError
impl HTTPError
pub fn bad_request<S: ToString>(s: S) -> Self
pub fn internal_server_error<S: ToString>(s: S) -> Self
Trait Implementations§
Source§impl IntoResponse for HTTPError
impl IntoResponse for HTTPError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for HTTPError
impl RefUnwindSafe for HTTPError
impl Send for HTTPError
impl Sync for HTTPError
impl Unpin for HTTPError
impl UnwindSafe for HTTPError
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