rocket_codegen 0.3.17

Code generation for the Rocket web framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(plugin, custom_derive)]
#![plugin(rocket_codegen)]

extern crate rocket;

use rocket::request::{FromForm, FormItems};

#[derive(PartialEq, Debug, FromForm)]
struct Form {  }

fn main() {
    // Same number of arguments: simple case.
    let task = Form::from_form(&mut FormItems::from(""), true);
    assert_eq!(task, Ok(Form { }));

    let task = Form::from_form(&mut FormItems::from(""), false);
    assert_eq!(task, Ok(Form { }));
}