paperclip icon indicating copy to clipboard operation
paperclip copied to clipboard

Future of actix plugin interface

Open Ploppz opened this issue 6 years ago • 2 comments

Having to 'override' actix_web::web with paperclip::actix::web does not seem like a nice solution. I would guess it requires some maintenance to mirror all features of actix_web. Secondly, it is not modular, If you had two plugins that worked this way you could only use one.

I don't have a better idea right now, but I make this issue to raise the concern and maybe start a discussion.

Ploppz avatar Aug 26 '19 07:08 Ploppz

Thanks! I'm always open to new ideas! :smile:

wafflespeanut avatar Aug 26 '19 09:08 wafflespeanut

Decorating the inspected concepts like App, Resource, Scope and ServiceConfig is hard, because actix_web implements most methods on structs directly instead of on traits. The way forward would be to factor out wrapped methods upstream in actix_web onto traits that have default, statically overridable implementation (so no dyn Traits, but impl Traits).