Open olivedae opened 8 years ago
Allow namespaces (and it's accompanying path) to be defined along with related details (e.g. routes and/or nested namespaces).
The 可愛い!(scaffold <etc>) was meant to support nesting due to rustless implementing Nesting and ApiHandler for both Api and Namespace.
可愛い!(scaffold <etc>)
Nesting
ApiHandler
Api
Namespace
A rough example is given below (does include dependency injection).
fn test<'a>(client: Client<'a>, example: String) -> Response<'a> { // ... } fn other_test<'a>(client: Client<'a>) -> Response<'a> { // ... } fn main() { let application = 可愛い!( namespace (first/example:string) [ get (one) -> test; get (two) -> test; ] namespace (second/example) [ get (one) -> other_test; ] get (last/example:string) -> test; ); // ... }
To be honest, I'm not a huge fan of the brackets but there needs to be some way to tell when the current namespace ends.
Allow namespaces (and it's accompanying path) to be defined along with related details (e.g. routes and/or nested namespaces).
The
可愛い!(scaffold <etc>)
was meant to support nesting due to rustless implementingNesting
andApiHandler
for bothApi
andNamespace
.A rough example is given below (does include dependency injection).
To be honest, I'm not a huge fan of the brackets but there needs to be some way to tell when the current namespace ends.