pub struct Multipart { /* private fields */ }
Expand description
Multipart extractor
Meant to be used in functions to extract files from an http request
async fn receive_file(multipart: Multipart) -> Response {
for file in multipart.files() {
if let Some(filename) = &file.filename {
log::info!("Found file {}, writing content", filename);
// Do something with the file...
}
}
Response::ok()
}
Implementations
sourceimpl Multipart
impl Multipart
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Multipart
impl Send for Multipart
impl Sync for Multipart
impl Unpin for Multipart
impl UnwindSafe for Multipart
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more