Struct form_data::Limits[][src]

pub struct Limits {
    pub field_name_size: Option<usize>,
    pub field_size: Option<usize>,
    pub fields: Option<usize>,
    pub file_size: Option<usize>,
    pub files: Option<usize>,
    pub parts: Option<usize>,
    pub stream_size: Option<u64>,
    pub buffer_size: usize,
}

Various limits on incoming data

Fields

field_name_size: Option<usize>

Max field name size

field_size: Option<usize>

Max field value size

fields: Option<usize>

Max number of non-file fields

file_size: Option<usize>

Max file size

files: Option<usize>

Max number of file fields

parts: Option<usize>

Max number of parts (fields + files)

stream_size: Option<u64>

Max number of whole stream

buffer_size: usize

Max number of buffer size

Implementations

impl Limits[src]

pub const DEFAULT_BUFFER_SIZE: usize[src]

Max number of buffer size

pub fn field_name_size(self, max: usize) -> Self[src]

Max field name size

pub fn field_size(self, max: usize) -> Self[src]

Max field value size

pub fn fields(self, max: usize) -> Self[src]

Max number of non-file fields

pub fn file_size(self, max: usize) -> Self[src]

Max file size

pub fn files(self, max: usize) -> Self[src]

Max number of file fields

pub fn parts(self, max: usize) -> Self[src]

Max number of parts (fields + files)

pub fn buffer_size(self, max: usize) -> Self[src]

Max number of buffer size

pub fn stream_size(self, max: u64) -> Self[src]

Max number of whole stream size

pub fn checked_parts(&self, rhs: usize) -> bool[src]

Check parts

pub fn checked_fields(&self, rhs: usize) -> bool[src]

Check fields

pub fn checked_files(&self, rhs: usize) -> bool[src]

Check files

pub fn checked_stream_size(&self, rhs: u64) -> bool[src]

Check stream size

pub fn checked_file_size(&self, rhs: usize) -> bool[src]

Check file size

pub fn checked_field_size(&self, rhs: usize) -> bool[src]

Check field size

pub fn checked_field_name_size(&self, rhs: usize) -> bool[src]

Check field name size

Trait Implementations

impl Debug for Limits[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for Limits[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl<'de> Deserialize<'de> for Limits[src]

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for Limits[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl RefUnwindSafe for Limits

impl Send for Limits

impl Sync for Limits

impl Unpin for Limits

impl UnwindSafe for Limits

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]