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: HttpResponseTrait Implementations§
Source§impl Responder for HttpResponseWrapper
Available on crate feature actix4 only.
impl Responder for HttpResponseWrapper
Available on crate feature
actix4 only.Auto Trait Implementations§
impl !Freeze for HttpResponseWrapper
impl !RefUnwindSafe for HttpResponseWrapper
impl !Send for HttpResponseWrapper
impl !Sync for HttpResponseWrapper
impl Unpin for HttpResponseWrapper
impl UnsafeUnpin 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