Struct viz::prelude::types::MultipartLimits [−]
pub struct MultipartLimits {
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,
}
Expand description
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
impl Limits
pub const DEFAULT_FIELD_NAME_SIZE: usize
pub const DEFAULT_FIELD_NAME_SIZE: usize
Max number of field name size, defaults to 100.
pub const DEFAULT_FIELD_SIZE: usize
pub const DEFAULT_FIELD_SIZE: usize
Max number of field value size, defaults to 100KB.
pub const DEFAULT_FILE_SIZE: usize
pub const DEFAULT_FILE_SIZE: usize
Max number of file size, defaults to 10MB.
pub const DEFAULT_STREAM_SIZE: u64
pub const DEFAULT_STREAM_SIZE: u64
Max number of stream size, defaults to 200MB.
pub const DEFAULT_BUFFER_SIZE: usize
pub const DEFAULT_BUFFER_SIZE: usize
Max number of buffer size, defaults to 8KB
pub fn field_name_size(self, max: usize) -> Limits
pub fn field_name_size(self, max: usize) -> Limits
Max field name size
pub fn field_size(self, max: usize) -> Limits
pub fn field_size(self, max: usize) -> Limits
Max field value size
pub fn buffer_size(self, max: usize) -> Limits
pub fn buffer_size(self, max: usize) -> Limits
Max number of buffer size
pub fn stream_size(self, max: u64) -> Limits
pub fn stream_size(self, max: u64) -> Limits
Max number of whole stream size
pub fn checked_parts(&self, rhs: usize) -> Option<usize>
pub fn checked_parts(&self, rhs: usize) -> Option<usize>
Check parts
pub fn checked_fields(&self, rhs: usize) -> Option<usize>
pub fn checked_fields(&self, rhs: usize) -> Option<usize>
Check fields
pub fn checked_files(&self, rhs: usize) -> Option<usize>
pub fn checked_files(&self, rhs: usize) -> Option<usize>
Check files
pub fn checked_stream_size(&self, rhs: u64) -> Option<u64>
pub fn checked_stream_size(&self, rhs: u64) -> Option<u64>
Check stream size
pub fn checked_file_size(&self, rhs: usize) -> Option<usize>
pub fn checked_file_size(&self, rhs: usize) -> Option<usize>
Check file size
pub fn checked_field_size(&self, rhs: usize) -> Option<usize>
pub fn checked_field_size(&self, rhs: usize) -> Option<usize>
Check field size
pub fn checked_field_name_size(&self, rhs: usize) -> Option<usize>
pub fn checked_field_name_size(&self, rhs: usize) -> Option<usize>
Check field name size
Trait Implementations
impl<'de> Deserialize<'de> for Limits
impl<'de> Deserialize<'de> for Limits
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Limits, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Limits, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Limits
impl UnwindSafe for Limits
Blanket Implementations
Mutably borrows from an owned value. Read more
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
pub fn vzip(self) -> V
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more