pub enum FormField {
Text {
name: String,
value: String,
},
File {
name: String,
filename: String,
content: Vec<u8>,
},
}Expand description
Represents a field in a multipart/form-data request.
Variants§
Implementations§
Source§impl FormField
impl FormField
Sourcepub fn text(name: impl Into<String>, value: impl Into<String>) -> Self
pub fn text(name: impl Into<String>, value: impl Into<String>) -> Self
Create a text field.
§Example
use toolcraft_request::FormField;
let field = FormField::text("username", "john_doe");Trait Implementations§
Auto Trait Implementations§
impl Freeze for FormField
impl RefUnwindSafe for FormField
impl Send for FormField
impl Sync for FormField
impl Unpin for FormField
impl UnwindSafe for FormField
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