pub struct MultipartForm { /* private fields */ }
Available on crate feature
multipart
only.Expand description
Create multipart forms to be used in API responses.
This struct implements IntoResponse
, and so it can be returned from a handler.
Implementations§
Source§impl MultipartForm
impl MultipartForm
Sourcepub fn with_parts(parts: Vec<Part>) -> Self
pub fn with_parts(parts: Vec<Part>) -> Self
Initialize a new multipart form with the provided vector of parts.
§Examples
use axum_extra::response::multiple::{MultipartForm, Part};
let parts: Vec<Part> = vec![Part::text("foo".to_string(), "abc"), Part::text("bar".to_string(), "def")];
let form = MultipartForm::with_parts(parts);
Trait Implementations§
Source§impl Debug for MultipartForm
impl Debug for MultipartForm
Source§impl FromIterator<Part> for MultipartForm
impl FromIterator<Part> for MultipartForm
Source§impl IntoResponse for MultipartForm
impl IntoResponse for MultipartForm
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for MultipartForm
impl RefUnwindSafe for MultipartForm
impl Send for MultipartForm
impl Sync for MultipartForm
impl Unpin 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