pub struct HttpResponse(/* private fields */);
Expand description
A wrapper for worker::Response
.
By using HttpResponse
, it allows you to work with with the response object without having to work with Result
and unecessary unwrap.
Implementations§
Source§impl HttpResponse
impl HttpResponse
Sourcepub fn from_response(res: Response) -> Self
pub fn from_response(res: Response) -> Self
Constructs a response from worker::Response.
Trait Implementations§
Source§impl Debug for HttpResponse
impl Debug for HttpResponse
Source§impl From<HttpResponse> for Response
impl From<HttpResponse> for Response
Source§fn from(res: HttpResponse) -> Self
fn from(res: HttpResponse) -> Self
Converts to this type from the input type.
Source§impl From<HttpResponse> for Response
impl From<HttpResponse> for Response
Source§fn from(res: HttpResponse) -> Self
fn from(res: HttpResponse) -> Self
Converts to this type from the input type.
Source§impl From<HttpResponse> for Result<Response>
impl From<HttpResponse> for Result<Response>
Source§fn from(res: HttpResponse) -> Self
fn from(res: HttpResponse) -> Self
Converts to this type from the input type.
Source§impl From<Response> for HttpResponse
impl From<Response> for HttpResponse
Source§impl Responder for HttpResponse
impl Responder for HttpResponse
Source§fn to_response(self, _: HttpRequest) -> HttpResponse
fn to_response(self, _: HttpRequest) -> HttpResponse
Convert
Self
to HttpResponse
Auto Trait Implementations§
impl Freeze for HttpResponse
impl RefUnwindSafe for HttpResponse
impl !Send for HttpResponse
impl !Sync for HttpResponse
impl Unpin for HttpResponse
impl UnwindSafe for HttpResponse
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