pub struct EmailAttachmentInfo {
pub index: usize,
pub name: String,
pub content_type: Option<String>,
pub format: Option<InputFormat>,
pub size: u64,
pub inline: bool,
pub skipped: Option<String>,
}Expand description
One attachment of a message as listed by EmailAttachments::open.
Fields§
§index: usizePosition among the message’s attachments (for
EmailAttachments::read / EmailAttachments::data).
name: StringA safe file name, unique within the message: the declared name
reduced to its base name with path separators, control and
bidirectional-format characters removed, attachment-N (plus the
extension its media type implies) when the message declares none,
<subject>.eml for a forwarded message; a repeated name gets -2,
-3, … before its extension.
content_type: Option<String>The declared media type (type/subtype, lower-case), when there is one.
format: Option<InputFormat>The format the attachment converts as — from its extension, else its
media type, else the bytes’ own signature; None when it is skipped.
size: u64Payload size in bytes (0 for a payload-less attachment).
inline: boolWhether it is an image the message shows inline — part of the HTML
body (Content-Disposition: inline or a Content-ID on an image
part, Outlook’s hidden flag) rather than a file to open. Only images:
a PDF some mailers dispose inline is still an attachment here.
skipped: Option<String>Why the attachment is not converted, when it is not: no payload
(reference, OLE object), over a limit, an archive, or an unsupported
type. The bytes of an unsupported type or an archive are still
available through EmailAttachments::data; those over a limit are
not kept.
Trait Implementations§
Source§impl Clone for EmailAttachmentInfo
impl Clone for EmailAttachmentInfo
Source§impl Debug for EmailAttachmentInfo
impl Debug for EmailAttachmentInfo
impl Eq for EmailAttachmentInfo
Source§impl PartialEq for EmailAttachmentInfo
impl PartialEq for EmailAttachmentInfo
impl StructuralPartialEq for EmailAttachmentInfo
Auto Trait Implementations§
impl Freeze for EmailAttachmentInfo
impl RefUnwindSafe for EmailAttachmentInfo
impl Send for EmailAttachmentInfo
impl Sync for EmailAttachmentInfo
impl Unpin for EmailAttachmentInfo
impl UnsafeUnpin for EmailAttachmentInfo
impl UnwindSafe for EmailAttachmentInfo
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more