Ogeon / rustful

[OUTDATED] A light HTTP framework for Rust
https://docs.rs/rustful
Apache License 2.0
862 stars 52 forks source link

Split the Router trait into a Find trait and an Insert trait #109

Closed Ogeon closed 7 years ago

Ogeon commented 8 years ago

That should allow more customizable routing than today's model. Find will be required by the Server, while Insert is optional and only for regular route insertion. They could also have separate Handler(-ish) types, to allow handlers to return other types than their own. That would allow things like inserting TypeA that returns Box<Handler>, for example. This may need some tweaking.