Url router using nom?


#1

Has anyone given serious consideration to using the nom parser generator to create an url router for a web service? Seems to me it should be extremely suitable to create an efficient and type-safe router, by having the router return an instance of an enum with variants for all defined routes, and handling them in a match.

I haven’t actually tried it myself (yet), but it seems to me it would be pretty much a perfect fit. Is there any obvious drawbacks I have missed?