#[macro_use] extern crate rocket; use rocket::{Request, Data}; use rocket::local::blocking::Client; use rocket::data::{self, FromData}; use rocket::http::ContentType; use rocket::form::Form; // Test that the data parameters works as expected. #[derive(FromForm)] struct Inner<'r> { field: &'r str } struct Simple<'r>(&'r str); #[async_trait] impl<'r> FromData<'r> for Simple<'r> { type Error = std::io::Error; async fn from_data(req: &'r Request<'_>, data: Data<'r>) -> data::Outcome<'r, Self> { <&'r str>::from_data(req, data).await.map(Simple) } } #[post("/f", data = "