Struct actix_web::dev::FormConfig
[−]
[src]
pub struct FormConfig { /* fields omitted */ }
Form extractor configuration
#[macro_use] extern crate serde_derive; use actix_web::{App, Form, Result, http}; #[derive(Deserialize)] struct FormData { username: String, } /// extract form data using serde. /// custom configuration is used for this handler, max payload size is 4k fn index(form: Form<FormData>) -> Result<String> { Ok(format!("Welcome {}!", form.username)) } fn main() { let app = App::new().resource( "/index.html", |r| { r.method(http::Method::GET) .with(index) .limit(4096);} // <- change form extractor configuration ); }
Methods
impl FormConfig
[src]
ⓘImportant traits for &'a mut Wpub fn limit(&mut self, limit: usize) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Change max size of payload. By default max size is 256Kb