You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Types that implement the BeforeMiddleware or AfterMiddleware traits are the actual middleware handler. However, types that implements AroundMiddleware are more like builders, and another type is going to be the actual middleware handler. This seems rather unnecessary and confusing to me.
I think a better design for the AroundMiddleware API would be:
Types that implement the
BeforeMiddleware
orAfterMiddleware
traits are the actual middleware handler. However, types that implementsAroundMiddleware
are more like builders, and another type is going to be the actual middleware handler. This seems rather unnecessary and confusing to me.I think a better design for the
AroundMiddleware
API would be:Here's a preliminary implementation:
Arc
s are needed because of the'static
bounds. Otherwise, could've used references. Happy to turn this into a PR if you think this is a good idea.The text was updated successfully, but these errors were encountered: