pub struct PartHead<'p> { /* private fields */ }Expand description
The validated header block of one part, borrowed.
A head is only produced after every header budget and rule passed.
Implementations§
Source§impl<'p> PartHead<'p>
impl<'p> PartHead<'p>
Sourcepub const fn name(&self) -> &'p str
pub const fn name(&self) -> &'p str
The field name, with %0A, %0D, %22 decoded to LF, CR, " (no
other escape is decoded). Always valid UTF-8 and never empty.
Sourcepub fn content_type(&self) -> Option<ContentType<'p>>
pub fn content_type(&self) -> Option<ContentType<'p>>
The declared Content-Type: a hint, never trusted.
Sourcepub const fn charset(&self) -> Charset
pub const fn charset(&self) -> Charset
The part’s own charset parameter (Unspecified when absent).
Sourcepub fn headers(&self) -> Headers<'p> ⓘ
pub fn headers(&self) -> Headers<'p> ⓘ
Every header line, in order, as raw (name, value) bytes.
Sourcepub const fn header_bytes(&self) -> u32
pub const fn header_bytes(&self) -> u32
The size of the header block, the final CRLF CRLF included.
Trait Implementations§
Auto Trait Implementations§
impl<'p> Freeze for PartHead<'p>
impl<'p> RefUnwindSafe for PartHead<'p>
impl<'p> Send for PartHead<'p>
impl<'p> Sync for PartHead<'p>
impl<'p> Unpin for PartHead<'p>
impl<'p> UnsafeUnpin for PartHead<'p>
impl<'p> UnwindSafe for PartHead<'p>
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