Closed Ogeon closed 8 years ago
I'm still not done porting router merging, and there's still a bit more documenting left to do.
This took another decomposition turn, but I think this is all, now. I have some more abstraction plans, but those are for an other time.
@homu r+
:pushpin: Commit 2a25283 has been approved by Ogeon
:hourglass: Testing commit 2a25283 with merge 68ab597...
This makes the library support composable routers and closes #86. The
Router
trait is changed to make it easier to have routers within routers, by taking part of the routing state as an argument tofind
.TreeRouter
is changed to support inner routers, and the method routing and variable parts are extracted intoMethodRuter
andVariables
. These being together is still favored by theTreeRouter::new()
andTreeRouter::from_iter(...)
methods, by creating aTreeRouter<MethodRouter<Variables<H>>>
instead of just aTreeRouter<T>
.This is a breaking change, since it changes the
Router
trait and the composition ofTreeRouter
. It will, however, not be noticeable by everyone, since the basic behavior is the same.