Feature Request: Add impl Middlware
to support simple stateless middlewares
#854
Labels
enhancement
New feature or request
I read a blog post that included a simplified middleware so I wrote one of my own:
Unfortunately, that didn't work. Off to the API docs, and I find that Middleware only has an
impl
for:At this point, as a merely intermediate Rust user, my eyes glazed over. So I generated my own impl like this: (Though I had to just try out different lifetimes until the compiler was happy. Because I'm still a bit vague on the how async_trait transforms the code, and so what signature I need to implement to match the one in the Rust docs.)
But, AFAICT, there's no reason that Tide couldn't just add an
impl Middleware
for these type of bare/stateless middlewares. Then you could just:The text was updated successfully, but these errors were encountered: