Struct reqwest::multipart::Part [−][src]
pub struct Part { /* fields omitted */ }A field in a multipart form.
Methods
impl Part[src]
impl Partpub 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) -> PartAdds 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
) -> PartAdds 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) -> PartSets the filename, builder style.
pub fn headers(&self) -> &HeaderMap[src]
pub fn headers(&self) -> &HeaderMapReturns 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 HeaderMapReturns a reference to the map with additional header fields