pub struct MultipartField {
pub wire_name: String,
pub rust_name: RustIdent,
pub ty: RustType,
pub optional: bool,
pub is_file: bool,
}Expand description
A single field of a Multipart body.
Fields§
§wire_name: StringWire field name (the part’s Content-Disposition name).
rust_name: RustIdentTarget struct field identifier on the generated <Op>Multipart struct.
ty: RustTypeThe decoded field type: Vec<u8> for a binary (file) part, else a
scalar. This is the bare inner type even when the field is optional.
MultipartField::optional records whether the struct wraps it in
Option<..>.
optional: boolWhether the generated struct wraps this field in Option<..> (true when
the property is not required, or is nullable). An absent
non-optional field is a 400. An absent optional field is None.
is_file: boolWhether the part is a binary/file field read as raw bytes (Vec<u8>).
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 moreSource§impl Debug for MultipartField
impl Debug for MultipartField
Source§impl PartialEq for MultipartField
impl PartialEq for MultipartField
impl StructuralPartialEq for MultipartField
Auto 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