pub struct EmailAttachments { /* private fields */ }Expand description
A message’s attachments, opened for conversion. See the module docs.
Implementations§
Source§impl EmailAttachments
impl EmailAttachments
Sourcepub fn open(
bytes: &[u8],
limits: &ArchiveLimits,
) -> Result<Self, ConversionError>
pub fn open( bytes: &[u8], limits: &ArchiveLimits, ) -> Result<Self, ConversionError>
Parse bytes — an .eml, or an Outlook .msg (by its CFB
signature) — and classify every attachment. Fails only when the bytes
are not a message.
Sourcepub fn entries(&self) -> &[EmailAttachmentInfo]
pub fn entries(&self) -> &[EmailAttachmentInfo]
The attachments in message order, convertible or skipped.
Sourcepub fn data(&self, index: usize) -> Option<&[u8]>
pub fn data(&self, index: usize) -> Option<&[u8]>
The raw bytes of attachment index, when they were kept: every
attachment with a payload within the limits, convertible or not.
Sourcepub fn read(&self, index: usize) -> Result<SourceDocument, ConversionError>
pub fn read(&self, index: usize) -> Result<SourceDocument, ConversionError>
Attachment index as a source document named after its file stem.
Errors for an attachment open skipped.
Auto Trait Implementations§
impl Freeze for EmailAttachments
impl RefUnwindSafe for EmailAttachments
impl Send for EmailAttachments
impl Sync for EmailAttachments
impl Unpin for EmailAttachments
impl UnsafeUnpin for EmailAttachments
impl UnwindSafe for EmailAttachments
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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