bschwind / app-route Goto Github PK
View Code? Open in Web Editor NEWTreat application routes (URL path + query string) as strongly-typed Rust structs
License: MIT License
Treat application routes (URL path + query string) as strongly-typed Rust structs
License: MIT License
How should these be implemented? Should I parse them in exactly the same way as the query string, parse it just as a string, or something else?
I'm leaning towards the query string approach, but I don't use hash fragments often enough to know the most common use cases for them.
I tried compiling the example in the readme, but rustc
complained and spat out this message:
error: attribute must be of the form `#[path = "file"]`
--> src\main.rs:15:1
|
15 | #[path("/groups/:group_id/users")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This seems to be caused by the build-in path
attribute.
I'm using the latest rustc
(1.34.0), so I'm guessing you're using an older compiler, @bschwind.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.