pub enum Response {
Ok,
Redirect,
ClientErr,
ServerErr,
}Expand description
§Response
This enum simplifies return codes for HTTP responses
let ok = Response::Ok;
// OR
let ok = Response::from(200);Variants§
Ok
All Ok
Redirect
Link/Page has moved, redirect
ClientErr
Client error - something went wrong that was caused by the client
ServerErr
Server error - something went wrong server side
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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