Struct reqwest::multipart::Part [−][src]
pub struct Part { /* fields omitted */ }
A field in a multipart form.
Methods
impl Part
[src]
impl Part
pub fn text<T>(value: T) -> Part where
T: Into<Cow<'static, str>>,
[src]
pub fn text<T>(value: T) -> Part where
T: Into<Cow<'static, str>>,
Makes a text parameter.
pub fn reader<T: Read + Send + 'static>(value: T) -> Part
[src]
pub fn reader<T: Read + Send + 'static>(value: T) -> Part
Adds a generic reader.
Does not set filename or mime.
pub fn reader_with_length<T: Read + Send + 'static>(
value: T,
length: u64
) -> Part
[src]
pub fn reader_with_length<T: Read + Send + 'static>(
value: T,
length: u64
) -> Part
Adds a generic reader with known length.
Does not set filename or mime.
pub fn file<T: AsRef<Path>>(path: T) -> Result<Part>
[src]
pub fn file<T: AsRef<Path>>(path: T) -> Result<Part>
pub fn mime_str(self, mime: &str) -> Result<Part>
[src]
pub fn mime_str(self, mime: &str) -> Result<Part>
Tries to set the mime of this part.
pub fn file_name<T: Into<Cow<'static, str>>>(self, filename: T) -> Part
[src]
pub fn file_name<T: Into<Cow<'static, str>>>(self, filename: T) -> Part
Sets the filename, builder style.
pub fn headers(&self) -> &HeaderMap
[src]
pub fn headers(&self) -> &HeaderMap
Returns a reference to the map with additional header fields
pub fn headers_mut(&mut self) -> &mut HeaderMap
[src]
pub fn headers_mut(&mut self) -> &mut HeaderMap
Returns a reference to the map with additional header fields