pub struct MimePart {
pub headers: Vec<(String, String)>,
pub body: Vec<u8>,
}Expand description
A single part from a multipart MIME body.
Fields§
§headers: Vec<(String, String)>MIME part headers (e.g., Content-Type, Content-ID).
body: Vec<u8>Part body bytes.
Implementations§
Source§impl MimePart
impl MimePart
Sourcepub fn content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
Returns the Content-Type header value, if present.
Sourcepub fn content_id(&self) -> Option<&str>
pub fn content_id(&self) -> Option<&str>
Returns the Content-ID header value, if present.
Sourcepub fn content_disposition(&self) -> Option<&str>
pub fn content_disposition(&self) -> Option<&str>
Returns the Content-Disposition header value, if present.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MimePart
impl RefUnwindSafe for MimePart
impl Send for MimePart
impl Sync for MimePart
impl Unpin for MimePart
impl UnsafeUnpin for MimePart
impl UnwindSafe for MimePart
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