Rocket: Rust Web-Framework

Note

Mostly macros will be used here.

Routes

Two methods can be used to define routes using macros. Using the method(such as get, post, put, delete) and using the route macro. [Route(METHOD, URL=PATH] can be used for explicit route defining. otherwise get , post , put , delete , head, patch and options can be used to define routes. The macro will be used as follows:

#[get("/")]
fn index() -> &'static str {
    "Hello, world!"
}

Backlinks