ibraheemdev / matchit

A high performance, zero-copy URL router.
https://docs.rs/matchit
MIT License
366 stars 37 forks source link

Enhancement Request: Dynamic Route Removal and Update Support in Matchit #44

Closed bruno-ortiz closed 6 months ago

bruno-ortiz commented 1 year ago

I am in the process of developing a system that enables the dynamic registration and removal of HTTP routes while the service is in operation.

While Matchit offers impressive functionality, it currently lacks the capability to remove and update routes. Is there a possibility of incorporating these features into the framework?

I understand that there are existing workarounds for this limitation, but having built-in support for these actions in the future would be greatly appreciated.

Thank you for your dedication and hard work!

ibraheemdev commented 1 year ago

I've heard of services that require this before, I'd happily accept a pull request implementing remove. Also something to consider - removing a route could allow affected static nodes to be merged with their parent, though this could be implemented later.

Updating a route's value is already supported via at_mut, unless you were referring to a different type of update?

ibraheemdev commented 6 months ago

Released in 0.8.2. Thanks to @Totodore for their work on this!