pub struct Form { /* private fields */ }
Expand description
An async multipart/form-data request.
Implementations
sourceimpl Form
impl Form
sourcepub fn text<T, U>(self, name: T, value: U) -> Form where
T: Into<Cow<'static, str>>,
U: Into<Cow<'static, str>>,
pub fn text<T, U>(self, name: T, value: U) -> Form where
T: Into<Cow<'static, str>>,
U: Into<Cow<'static, str>>,
Add a data field with supplied name and value.
Examples
let form = reqwest::multipart::Form::new()
.text("username", "seanmonstar")
.text("password", "secret");
sourcepub fn part<T>(self, name: T, part: Part) -> Form where
T: Into<Cow<'static, str>>,
pub fn part<T>(self, name: T, part: Part) -> Form where
T: Into<Cow<'static, str>>,
Adds a customized Part.
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
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Form
impl Send for Form
impl Sync for Form
impl Unpin for Form
impl !UnwindSafe for Form
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more