pub struct FormConfig {
pub max_fields: Option<usize>,
pub max_bytes: Option<usize>,
}Expand description
Configuration for FormDataFormat. Both caps are on by default.
Fields§
§max_fields: Option<usize>Maximum number of non-empty pairs accepted by unmarshal, duplicates
included. Empty & segments do not count. Default 1_000.
None disables the cap (not recommended for untrusted input).
max_bytes: Option<usize>Maximum input length in bytes accepted by unmarshal. Default 1 MiB.
None disables the cap.
Trait Implementations§
Source§impl Clone for FormConfig
impl Clone for FormConfig
Source§impl Debug for FormConfig
impl Debug for FormConfig
Source§impl Default for FormConfig
impl Default for FormConfig
Source§impl<'de> Deserialize<'de> for FormConfigwhere
FormConfig: Default,
impl<'de> Deserialize<'de> for FormConfigwhere
FormConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for FormConfig
impl Freeze for FormConfig
impl RefUnwindSafe for FormConfig
impl Send for FormConfig
impl Sync for FormConfig
impl Unpin for FormConfig
impl UnsafeUnpin for FormConfig
impl UnwindSafe for FormConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more