pub struct Part { /* private fields */ }
Expand description
For creating a section of a MultipartForm.
Use Part::text()
and Part::bytes()
for creating new instances.
Then attach them to a MultipartForm
using MultipartForm::add_part()
.
Implementations§
source§impl Part
impl Part
sourcepub fn text<T>(text: T) -> Selfwhere
T: Display,
pub fn text<T>(text: T) -> Selfwhere
T: Display,
Creates a new part of a multipart form, that will send text.
The default mime type for this part will be text/plain
,
sourcepub fn bytes<B>(bytes: B) -> Self
pub fn bytes<B>(bytes: B) -> Self
Creates a new part of a multipart form, that will upload bytes.
The default mime type for this part will be application/octet-stream
,
Auto Trait Implementations§
impl !Freeze for Part
impl RefUnwindSafe for Part
impl Send for Part
impl Sync for Part
impl Unpin for Part
impl UnwindSafe for Part
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