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
This topic continues actix/actix-web#2858 , whole goal is to .wrap an optional middleware. Condition middleware exists but requires a transformer even when unused. It seems to me that using an Option is more natural. But as that PR was on a different crate than Transform's, a newtype was introduced, and .into() required an explicit annotation. Sadly this was non-optimal.
@fakeshadow suggested that this feature should rather be moved into Transform's crate, so that .wrap can natively take an Option<SomeMiddleware>. This would mean moving the ConditionMiddleware code too.
The text was updated successfully, but these errors were encountered:
That said advanced (specialized typed) condition middleware is still needed. If the middleware end up mutate input/output types then actix-service would not be aware of it as no concrete types can be used inside the crate.
This topic continues actix/actix-web#2858 , whole goal is to
.wrap
an optional middleware.Condition
middleware exists but requires a transformer even when unused. It seems to me that using anOption
is more natural. But as that PR was on a different crate thanTransform
's, a newtype was introduced, and.into()
required an explicit annotation. Sadly this was non-optimal.@fakeshadow suggested that this feature should rather be moved into
Transform
's crate, so that.wrap
can natively take anOption<SomeMiddleware>
. This would mean moving theConditionMiddleware
code too.The text was updated successfully, but these errors were encountered: