paperclip
paperclip copied to clipboard
Wrap actix-web codegen for route definitions
The convenience of using the get, delete etc proc macros for defining routes is great. I would love to have that same convenience when using paperclip.
Um sorry, actix-web has proc macros???
Yes indeed it does. https://github.com/actix/actix-web/tree/master/actix-web-codegen. I don't think it is well documented. Here is an example of how it is used https://github.com/actix/actix-web/blob/master/examples/basic.rs#L7.
Oh nice! I never knew. I'll schedule that for 0.4.0.
#289 added initial support for this.
Is this issue still being worked on? I am still getting:
|
10 | cfg.service(scope("/refs").service(services![get_references, add_qref, add_href]));
| ^^^^^^^ the trait `Mountable` is not implemented for `(get_references, add_qref, add_href)`
|
note: required by a bound in `paperclip::actix::web::Scope::<actix_web::Scope<T>>::service`
in paperclip 0.7 and actix_web 4.0