rocket/form/options.rs
1/// Form guard options.
2///
3/// See [`Form#leniency`](crate::form::Form#leniency) for details.
4#[derive(Debug, Copy, Clone, PartialEq, Eq)]
5pub struct Options {
6 /// Whether parsing should be strict (no extra parameters) or not.
7 pub strict: bool,
8}
9
10#[allow(non_upper_case_globals, dead_code)]
11impl Options {
12 /// `Options` with `strict` set to `false`.
13 pub const Lenient: Self = Options { strict: false };
14
15 /// `Options` with `strict` set to `true`.
16 pub const Strict: Self = Options { strict: true };
17}