pub struct MultipartFormDataOptions<'a> {
pub max_data_bytes: u64,
pub temporary_dir: PathBuf,
pub allowed_fields: Vec<MultipartFormDataField<'a>>,
}
Expand description
Options for parsing multipart/form-data.
Fields
max_data_bytes: u64
The max number of bytes to read.
temporary_dir: PathBuf
A path of directory where the uploaded files will be stored. It should be created before parsing.
allowed_fields: Vec<MultipartFormDataField<'a>>
Allowed fields of data.
Implementations
sourceimpl<'a> MultipartFormDataOptions<'a>
impl<'a> MultipartFormDataOptions<'a>
sourcepub fn new() -> MultipartFormDataOptions<'a>
pub fn new() -> MultipartFormDataOptions<'a>
Create a default MultipartFormDataOptions
instance.
sourcepub fn with_multipart_form_data_fields(
allowed_fields: Vec<MultipartFormDataField<'a>>
) -> MultipartFormDataOptions<'a>
pub fn with_multipart_form_data_fields(
allowed_fields: Vec<MultipartFormDataField<'a>>
) -> MultipartFormDataOptions<'a>
Create a MultipartFormDataOptions
instance with existing multipart_form_data_fields.
Trait Implementations
sourceimpl<'a> Debug for MultipartFormDataOptions<'a>
impl<'a> Debug for MultipartFormDataOptions<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for MultipartFormDataOptions<'a>
impl<'a> Send for MultipartFormDataOptions<'a>
impl<'a> Sync for MultipartFormDataOptions<'a>
impl<'a> Unpin for MultipartFormDataOptions<'a>
impl<'a> UnwindSafe for MultipartFormDataOptions<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
Converts self
into a collection.
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
F: FnMut(T) -> U,
A: Array<Item = U>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more