Struct axum_test::multipart::MultipartForm
source · pub struct MultipartForm { /* private fields */ }
Implementations§
source§impl MultipartForm
impl MultipartForm
pub fn new() -> Self
sourcepub fn add_text<N, T>(self, name: N, text: T) -> Self
pub fn add_text<N, T>(self, name: N, text: T) -> Self
Creates a text part, and adds it to be sent.
sourcepub fn add_part<N>(self, name: N, part: Part) -> Selfwhere
N: Display,
pub fn add_part<N>(self, name: N, part: Part) -> Selfwhere
N: Display,
Adds a new section to this multipart form to be sent.
See Part
.
sourcepub fn content_type(&self) -> String
pub fn content_type(&self) -> String
Returns the content type this form will use when it is sent.
Trait Implementations§
source§impl From<MultipartForm> for Body
impl From<MultipartForm> for Body
source§fn from(multipart: MultipartForm) -> Self
fn from(multipart: MultipartForm) -> Self
Converts to this type from the input type.
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