pub struct Part<S> {
pub headers: Vec<(Cow<'static, str>, Cow<'static, str>)>,
pub name: Cow<'static, str>,
pub filename: Option<Cow<'static, str>>,
pub content_type: Cow<'static, str>,
pub body: PartBody<S>,
}
Available on crate feature
multipart
only.Expand description
Represents a part in a multipart form.
Each part has a name, optional filename, content type, and a body, along with optional additional headers.
Fields§
§headers: Vec<(Cow<'static, str>, Cow<'static, str>)>
Additional headers for this part.
name: Cow<'static, str>
Name of the form field.
filename: Option<Cow<'static, str>>
Optional filename for file parts.
content_type: Cow<'static, str>
MIME content type for this part.
body: PartBody<S>
Body content for this part.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Part<S>where
S: Freeze,
impl<S> RefUnwindSafe for Part<S>where
S: RefUnwindSafe,
impl<S> Send for Part<S>where
S: Send,
impl<S> Sync for Part<S>where
S: Sync,
impl<S> Unpin for Part<S>where
S: Unpin,
impl<S> UnwindSafe for Part<S>where
S: UnwindSafe,
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