pub struct MultipartForm { /* private fields */ }Expand description
A parsed multipart/form-data body.
Cheap to clone: files are reference-counted handles.
Implementations§
Source§impl MultipartForm
impl MultipartForm
Sourcepub fn push_field(&mut self, name: impl Into<String>, value: impl Into<String>)
pub fn push_field(&mut self, name: impl Into<String>, value: impl Into<String>)
Append a text field. Empty names are ignored.
Sourcepub fn texts<'a, 'n>(
&'a self,
name: &'n str,
) -> impl Iterator<Item = &'a str> + 'nwhere
'a: 'n,
pub fn texts<'a, 'n>(
&'a self,
name: &'n str,
) -> impl Iterator<Item = &'a str> + 'nwhere
'a: 'n,
Every text value for name, in order.
Sourcepub fn file<'a>(&'a self, name: &str) -> Option<&'a FormFile>
pub fn file<'a>(&'a self, name: &str) -> Option<&'a FormFile>
The first uploaded file for name.
Sourcepub fn files_named<'a, 'n>(
&'a self,
name: &'n str,
) -> impl Iterator<Item = &'a FormFile> + 'nwhere
'a: 'n,
pub fn files_named<'a, 'n>(
&'a self,
name: &'n str,
) -> impl Iterator<Item = &'a FormFile> + 'nwhere
'a: 'n,
Every uploaded file for name, in order.
Sourcepub fn field_count(&self) -> usize
pub fn field_count(&self) -> usize
Number of text fields.
Sourcepub fn file_count(&self) -> usize
pub fn file_count(&self) -> usize
Number of uploaded files.
Trait Implementations§
Source§impl Clone for MultipartForm
impl Clone for MultipartForm
Source§impl Debug for MultipartForm
impl Debug for MultipartForm
Auto Trait Implementations§
impl Freeze for MultipartForm
impl RefUnwindSafe for MultipartForm
impl Send for MultipartForm
impl Sync for MultipartForm
impl Unpin for MultipartForm
impl UnsafeUnpin for MultipartForm
impl UnwindSafe for MultipartForm
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