pub struct Form { /* private fields */ }Expand description
A multipart/form-data request.
Implementations§
Source§impl Form
impl Form
Sourcepub fn text<T, U>(self, name: T, value: U) -> Form
pub fn text<T, U>(self, name: T, value: U) -> Form
Add a data field with supplied name and value.
§Examples
let form = reqwest::blocking::multipart::Form::new()
.text("username", "seanmonstar")
.text("password", "secret");Sourcepub fn percent_encode_path_segment(self) -> Form
pub fn percent_encode_path_segment(self) -> Form
Configure this Form to percent-encode using the path-segment rules.
Sourcepub fn percent_encode_attr_chars(self) -> Form
pub fn percent_encode_attr_chars(self) -> Form
Configure this Form to percent-encode using the attr-char rules.
Sourcepub fn percent_encode_noop(self) -> Form
pub fn percent_encode_noop(self) -> Form
Configure this Form to skip percent-encoding
Sourcepub fn into_reader(self) -> impl Read
pub fn into_reader(self) -> impl Read
Produce a reader over the multipart form data.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Form
impl !RefUnwindSafe for Form
impl Send for Form
impl !Sync for Form
impl Unpin for Form
impl !UnwindSafe for Form
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more