Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate support for nested router instances #1

Open
whitfin opened this issue Apr 5, 2019 · 0 comments
Open

Investigate support for nested router instances #1

whitfin opened this issue Apr 5, 2019 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@whitfin
Copy link
Owner

whitfin commented Apr 5, 2019

One feature that other routers seem to like is the ability to plug a new router in as a delegate, rather than just routes themselves.

If I create paths /a, /b and /c on a router, I could attach that router on /numbers on a parent router to create /numbers/a, etc. It's unsure whether this would be re-calculated directly into the tree, or there would be some switch on whether a node is a router or not.

Technically you could build this on the current public API (I think), but it might be nice to support it directly as it allows more module code. You could have a users.rs which exposes all paths on the /user route - rather than always attach this prefix, this file could export a Router which is mounted on /user in a parent router.

@whitfin whitfin added the enhancement New feature or request label Apr 5, 2019
@whitfin whitfin added this to the 0.2 milestone Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant