pub struct Multipart { /* private fields */ }
Implementations§
Source§impl<'a> Multipart
impl<'a> Multipart
pub async fn new(multipart: NtexMultipart) -> Multipart
pub async fn process(&mut self) -> Result<&mut Multipart, MultipartError>
pub async fn save_file( file_input: &FileInput, path: impl AsRef<Path>, ) -> Result<(), MultipartError>
Sourcepub fn first_data(&self, field: &str) -> Option<&DataInput>
pub fn first_data(&self, field: &str) -> Option<&DataInput>
Get the first data input for a given field
Sourcepub fn first_data_required(
&self,
field: &str,
) -> Result<&DataInput, MultipartError>
pub fn first_data_required( &self, field: &str, ) -> Result<&DataInput, MultipartError>
Get the first data input for a given field. Returns an error if the field is not found
Sourcepub fn first_file(&self, field: &str) -> Option<&FileInput>
pub fn first_file(&self, field: &str) -> Option<&FileInput>
Get the first file for a given field
Trait Implementations§
Source§impl<Err> FromRequest<Err> for Multipart
impl<Err> FromRequest<Err> for Multipart
Source§type Error = Infallible
type Error = Infallible
The associated error which can be returned.
Source§async fn from_request(
req: &HttpRequest,
payload: &mut Payload,
) -> Result<Multipart, Infallible>
async fn from_request( req: &HttpRequest, payload: &mut Payload, ) -> Result<Multipart, Infallible>
Convert request to a Self
Auto Trait Implementations§
impl !Freeze for Multipart
impl !RefUnwindSafe for Multipart
impl !Send for Multipart
impl !Sync for Multipart
impl Unpin for Multipart
impl !UnwindSafe for Multipart
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