Rocket
A web framework for Rust
Rocket is a web framework for Rust that makes it simple to write fast, secure web applications without sacrificing flexibility, usability, or type safety. Handling forms is simple and easy. Simply derive FromForm for your structure and let Rocket know which parameter to use. Rocket parses and validates the form request, creates the structure, and calls your function. Bad form request? Rocket doesn’t call your function! What if you want to know if the form was bad? Simple! Change the type of task to Option or Result! Rocket has first-class support for JSON, right out of the box. Simply derive Deserialize or Serialize to receive or return JSON, respectively. Like other important features, JSON works through Rocket’s FromData trait, Rocket’s approach to deriving types from body data. It works like this: specify a data route parameter of any type that implements FromData. A value of that type will then be created automatically from the incoming request body.