Is there a reason why the Request instance is taken as a mutable reference, as opposed to consuming it? I am aware Iron does the same, but haven't found a rationale for this.
indicates the intent more clearly: the handler consumes the Request and produces a Result out of it. On the other hand, the current signature indicates that the Request might have some existence after the response has been served (and if it does not, it should be safe to let the handler consume it).
Consider the hello world handler:
Is there a reason why the Request instance is taken as a mutable reference, as opposed to consuming it? I am aware Iron does the same, but haven't found a rationale for this.
To me, this:
indicates the intent more clearly: the handler consumes the Request and produces a Result out of it. On the other hand, the current signature indicates that the Request might have some existence after the response has been served (and if it does not, it should be safe to let the handler consume it).