pub struct Multipart { /* private fields */ }Expand description
A multipart/form-data body, built in memory.
let request = HttpRequest::post("https://example.com/upload").with_multipart(
Multipart::new()
.with_text("prompt", "a cat")
.with_file("image", "cat.png", "image/png", vec![0x89, b'P', b'N', b'G']),
);Implementations§
Trait Implementations§
impl StructuralPartialEq for Multipart
Auto Trait Implementations§
impl Freeze for Multipart
impl RefUnwindSafe for Multipart
impl Send for Multipart
impl Sync for Multipart
impl Unpin for Multipart
impl UnsafeUnpin for Multipart
impl UnwindSafe for Multipart
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