#[non_exhaustive]pub struct ParsedAttachment {
pub filename: Option<String>,
pub content_type: String,
pub content_id: Option<String>,
pub is_inline: bool,
pub size: Option<u64>,
pub section: Option<String>,
}Expand description
Metadata for an attachment found during parsing.
Does not contain the attachment binary data — use the section field
to fetch the content on-demand via IMAP BODY.PEEK[section].
§References
- RFC 2183 (Content-Disposition)
- RFC 3501 Section 6.4.5 (MIME section numbers)
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.filename: Option<String>Filename from Content-Disposition or Content-Type name parameter.
content_type: StringMIME content type (e.g., "application/pdf").
content_id: Option<String>Content-ID header value, stripped of angle brackets (RFC 2392).
is_inline: booltrue if Content-Disposition: inline or has a Content-ID.
size: Option<u64>Size of the MIME part body in bytes (if available).
section: Option<String>IMAP MIME section number (e.g., "2", "1.2") for on-demand fetch.
Trait Implementations§
Source§impl Clone for ParsedAttachment
impl Clone for ParsedAttachment
Source§fn clone(&self) -> ParsedAttachment
fn clone(&self) -> ParsedAttachment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParsedAttachment
impl Debug for ParsedAttachment
Source§impl Hash for ParsedAttachment
impl Hash for ParsedAttachment
Source§impl PartialEq for ParsedAttachment
impl PartialEq for ParsedAttachment
impl Eq for ParsedAttachment
impl StructuralPartialEq for ParsedAttachment
Auto Trait Implementations§
impl Freeze for ParsedAttachment
impl RefUnwindSafe for ParsedAttachment
impl Send for ParsedAttachment
impl Sync for ParsedAttachment
impl Unpin for ParsedAttachment
impl UnsafeUnpin for ParsedAttachment
impl UnwindSafe for ParsedAttachment
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