pub struct HttpResponseWrapper(pub HttpResponse);
Expand description
Workaround for possibility to directly return HttpResponse from closure handler.
This is needed after actix removed impl Future
from HttpResponse
:
https://github.com/actix/actix-web/pull/2601
Example:
ⓘ
.route(web::get().to(||
async move {
paperclip::actix::HttpResponseWrapper(
HttpResponse::Ok().body("Hi there!")
)
}
))
Tuple Fields§
§0: HttpResponse
Trait Implementations§
source§impl Responder for HttpResponseWrapper
impl Responder for HttpResponseWrapper
Auto Trait Implementations§
impl !Freeze for HttpResponseWrapper
impl !RefUnwindSafe for HttpResponseWrapper
impl !Send for HttpResponseWrapper
impl !Sync for HttpResponseWrapper
impl Unpin for HttpResponseWrapper
impl !UnwindSafe for HttpResponseWrapper
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