RequestHandler creates a closure over the passed in parameters by defining a new type and assigning to decls in that type. This partially works because Zig creates a new instantiation of the function for each different type passed as the anytype argument. However, when the function has already been instantiated for the type passed, the type declaration inside the function is re-used, and the decls get overwritten. This affects the simple_router example in the repo, where /geta, /getb, and /inca all share the same self type and thus share the same request handler.
zap.Router will have to find another way to pass the self argument to the routing functions.