pub struct MultipartRelated { /* private fields */ }Expand description
A multipart/related body (RFC 2387): an ordered list of parts, each with its own
Content-Type and no Content-Disposition. A Google-style media upload is a JSON metadata
part followed by the media part.
Implementations§
Source§impl MultipartRelated
impl MultipartRelated
Sourcepub fn with_boundary(boundary: impl Into<String>) -> Self
pub fn with_boundary(boundary: impl Into<String>) -> Self
A related body with a pinned boundary; same rules as Multipart::with_boundary.
Sourcepub fn part(self, content_type: &str, body: impl Into<Vec<u8>>) -> Self
pub fn part(self, content_type: &str, body: impl Into<Vec<u8>>) -> Self
Append a part with its Content-Type. Parts are sent in the order added.
Sourcepub fn content_type(&self) -> String
pub fn content_type(&self) -> String
The Content-Type header value for this body.
Trait Implementations§
Source§impl Clone for MultipartRelated
impl Clone for MultipartRelated
Source§impl Debug for MultipartRelated
impl Debug for MultipartRelated
Auto Trait Implementations§
impl Freeze for MultipartRelated
impl RefUnwindSafe for MultipartRelated
impl Send for MultipartRelated
impl Sync for MultipartRelated
impl Unpin for MultipartRelated
impl UnsafeUnpin for MultipartRelated
impl UnwindSafe for MultipartRelated
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