pub struct MultipartField {
pub name: String,
pub value: MultipartValue,
}Expand description
One field of a multipart/form-data body — a plain text value or an
uploaded file part. Mirrors Playwright’s FormField
(multipartData: { name, value } | { name, file: { name, mimeType, buffer } }).
Fields§
§name: String§value: MultipartValueImplementations§
Source§impl MultipartField
impl MultipartField
Sourcepub fn from_json_map<I>(fields: I) -> Result<Vec<Self>, String>
pub fn from_json_map<I>(fields: I) -> Result<Vec<Self>, String>
Lower Playwright’s multipart option bag — a map of
string | number | boolean | { name, mimeType, buffer } — into
fields.
buffer accepts a byte array or a string (the natural JSON shape of
a Buffer / Uint8Array crossing either binding boundary). Both
bindings call this so a multipart bag means exactly one thing.
§Errors
Returns a message naming the offending key when a value is neither a scalar nor a well-formed file descriptor.
Trait Implementations§
Source§impl Clone for MultipartField
impl Clone for MultipartField
Source§fn clone(&self) -> MultipartField
fn clone(&self) -> MultipartField
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 MultipartField
impl RefUnwindSafe for MultipartField
impl Send for MultipartField
impl Sync for MultipartField
impl Unpin for MultipartField
impl UnsafeUnpin for MultipartField
impl UnwindSafe for MultipartField
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