pub struct MultipartOptions {
pub request: RequestOptions,
pub form_fields: HashMap<String, String>,
pub file_field: String,
pub file_path: String,
pub file_name: String,
pub file_data: Vec<u8>,
}Expand description
Options specific to multipart requests.
Used by the media upload path to ship a single file plus form fields
in one multipart/form-data POST.
Fields§
§request: RequestOptionsBase request configuration (target, headers, auth, verbose, trace).
form_fields: HashMap<String, String>Non-file form fields keyed by field name.
file_field: StringForm field name to attach the file under (e.g. "media").
file_path: StringPath to the file to upload. Mutually exclusive with file_data.
file_name: StringFilename surfaced to the server in the multipart part header. Only
consulted when file_data carries the bytes.
file_data: Vec<u8>In-memory file bytes. Mutually exclusive with file_path.
Trait Implementations§
Source§impl Clone for MultipartOptions
impl Clone for MultipartOptions
Source§fn clone(&self) -> MultipartOptions
fn clone(&self) -> MultipartOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MultipartOptions
impl RefUnwindSafe for MultipartOptions
impl Send for MultipartOptions
impl Sync for MultipartOptions
impl Unpin for MultipartOptions
impl UnsafeUnpin for MultipartOptions
impl UnwindSafe for MultipartOptions
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