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
As of right now, we do not allow Handlers to have an instance, that is, their respective handle method must not use the self parameter. This might be inconvenient in some cases, where the handler depends on runtime-data that shouldn't be stored in static variables. A good example for this would be the OpenAPI handler that is currently implemented as a raw gotham handler rather than as a resource read-all handler since it needs the specification, and there is currently no good way to infer it without using a middleware.
We should allow handlers to take self or &self parameters so they can refer to runtime data.
The text was updated successfully, but these errors were encountered:
As of right now, we do not allow Handlers to have an instance, that is, their respective handle method must not use the self parameter. This might be inconvenient in some cases, where the handler depends on runtime-data that shouldn't be stored in static variables. A good example for this would be the OpenAPI handler that is currently implemented as a raw gotham handler rather than as a resource read-all handler since it needs the specification, and there is currently no good way to infer it without using a middleware.
We should allow handlers to take self or &self parameters so they can refer to runtime data.
The text was updated successfully, but these errors were encountered: