pub struct MultipartForm<T>(pub T);Expand description
Axum extractor that parses multipart/form-data, auto-sanitizes text
fields, and exposes optional field-level validation.
T must implement FromMultipart, which is derived automatically with
#[derive(FromMultipart)]. When T also implements modo::validate::Validate
(derived with #[derive(modo::Validate)]), the .validate() method becomes
available after extraction.
The global max_file_size from crate::UploadConfig is applied to every
file field unless a per-field #[upload(max_size = "...")] attribute
overrides it.
Tuple Fields§
§0: TImplementations§
Source§impl<T> MultipartForm<T>
impl<T> MultipartForm<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Unwrap the inner parsed value.
Trait Implementations§
Source§impl<T> Deref for MultipartForm<T>
impl<T> Deref for MultipartForm<T>
Source§impl<T> FromRequest<AppState> for MultipartForm<T>where
T: FromMultipart + 'static,
impl<T> FromRequest<AppState> for MultipartForm<T>where
T: FromMultipart + 'static,
Auto Trait Implementations§
impl<T> Freeze for MultipartForm<T>where
T: Freeze,
impl<T> RefUnwindSafe for MultipartForm<T>where
T: RefUnwindSafe,
impl<T> Send for MultipartForm<T>where
T: Send,
impl<T> Sync for MultipartForm<T>where
T: Sync,
impl<T> Unpin for MultipartForm<T>where
T: Unpin,
impl<T> UnsafeUnpin for MultipartForm<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for MultipartForm<T>where
T: UnwindSafe,
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