pub struct MultipartPart { /* private fields */ }Expand description
A single MIME part in a multipart body.
Parts consist of headers (name-value pairs) and a binary body.
Implementations§
Source§impl Part
impl Part
Sourcepub fn text(name: &str, value: impl Into<String>) -> Part
pub fn text(name: &str, value: impl Into<String>) -> Part
Create a text part with a Content-Disposition: form-data; name=... header.
Per RFC 7578, text fields do not need an explicit Content-Type; the
receiver treats them as text/plain.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Part
impl RefUnwindSafe for Part
impl Send for Part
impl Sync for Part
impl Unpin for Part
impl UnsafeUnpin 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