pub struct Part<B> {
pub headers: HeaderMap,
pub body: B,
}Fields§
§headers: HeaderMap§body: BImplementations§
Source§impl<B> Part<B>
impl<B> Part<B>
pub fn new(headers: HeaderMap, body: B) -> Self
pub fn content_id(self, id: &str) -> Self
pub fn header_str<H: AsHeaderName>(&self, h: H) -> Option<&str>
pub fn header<H: IntoHeaderName>(self, h: H, v: HeaderValue) -> Self
Source§impl Part<InMemoryRequest>
impl Part<InMemoryRequest>
pub fn request(body: InMemoryRequest) -> Self
Trait Implementations§
Source§impl Into<InMemoryBody> for Part<InMemoryBody>
impl Into<InMemoryBody> for Part<InMemoryBody>
Source§fn into(self) -> InMemoryBody
fn into(self) -> InMemoryBody
Converts this type into the (usually inferred) input type.
Source§impl<T: WriteBytes> WriteBytes for Part<T>
impl<T: WriteBytes> WriteBytes for Part<T>
Auto Trait Implementations§
impl<B> Freeze for Part<B>where
B: Freeze,
impl<B> RefUnwindSafe for Part<B>where
B: RefUnwindSafe,
impl<B> Send for Part<B>where
B: Send,
impl<B> Sync for Part<B>where
B: Sync,
impl<B> Unpin for Part<B>where
B: Unpin,
impl<B> UnwindSafe for Part<B>where
B: 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