Static lifetimes in signed / private cookies
Before this commit, the Key
that's passed to Cookies::signed()
or Cookies::private()
is forced to have a static lifetime, because the returned Cookie
gets self's lifetime as its lifetime parameter. Now the Cookie
gets static lifetime instead.
This makes it possible e.g. to store Key
in an axum Extension layer instead of a global Cell.
Thank you @akheron 🙏