Currently the namespace path is decoded from a Str payload, meaning that we can extract it in a zero copy manner by slicing the Str and storing it like that.
It also fixes a lifetime issue for PR #333 with path params. Because the path need to outlive the decoded params from the matchit router as long as they are not decoded by the user.
Solution
Switch the namespace path to a Str.
Add some implementation of From for Str for the construction of new outgoing packets.
Motivation
Currently the namespace path is decoded from a
Str
payload, meaning that we can extract it in a zero copy manner by slicing theStr
and storing it like that. It also fixes a lifetime issue for PR #333 with path params. Because the path need to outlive the decoded params from the matchit router as long as they are not decoded by the user.Solution
Str
.From
forStr
for the construction of new outgoing packets.