### Get Raw Offset Start Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Header.html Returns the raw byte offset where the header starts. ```rust pub fn offset_start(&self) -> u32 ``` -------------------------------- ### Get Keywords Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves all 'Keywords' header fields, used for categorizing messages. ```rust pub fn keywords(&self) -> &HeaderValue<'x> ``` -------------------------------- ### Get Raw Header Offset Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Returns the starting byte offset of the raw header data for this part within the original message. ```rust pub fn raw_header_offset(&self) -> u32 ``` -------------------------------- ### Get List-Help Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'List-Help' header field, which provides a URL for help information about the mailing list. ```rust pub fn list_help(&self) -> &HeaderValue<'x> ``` -------------------------------- ### Get HeaderValue as DateTime Reference Source: https://docs.rs/mail-parser/latest/mail_parser/enum.HeaderValue.html Use `as_datetime` to get an `Option<&DateTime>` reference if the `HeaderValue` is `DateTime`. Returns `None` otherwise. ```rust pub fn as_datetime(&self) -> Option<&DateTime> ``` -------------------------------- ### Get Header Value Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Header.html Returns the parsed header value. ```rust pub fn value(&self) -> &HeaderValue<'x> ``` -------------------------------- ### Get HeaderValue as Address Reference Source: https://docs.rs/mail-parser/latest/mail_parser/enum.HeaderValue.html Use `as_address` to get an `Option<&Address<'x>>` reference if the `HeaderValue` is `Address`. Returns `None` otherwise. ```rust pub fn as_address(&self) -> Option<&Address<'x>> ``` -------------------------------- ### Get Raw Body Offset Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Returns the starting byte offset of the raw body data for this part within the original message. ```rust pub fn raw_body_offset(&self) -> u32 ``` -------------------------------- ### Get HeaderValue as ContentType Reference Source: https://docs.rs/mail-parser/latest/mail_parser/enum.HeaderValue.html Use `as_content_type` to get an `Option<&ContentType<'x>>` reference if the `HeaderValue` is `ContentType`. Returns `None` otherwise. ```rust pub fn as_content_type(&self) -> Option<&ContentType<'x>> ``` -------------------------------- ### headers() Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Get the message headers. ```APIDOC #### pub fn headers(&self) -> &[Header<'x>] ``` -------------------------------- ### Get Reception Date and Time Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the date and time when the email message was received. ```rust pub fn date(&self) -> Option ``` -------------------------------- ### Get Header Name Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Header.html Returns the header name as a string slice. ```rust pub fn name(&self) -> &str ``` -------------------------------- ### Get Return-Path Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves all 'Return-Path' header fields, which specifies the address to which delivery errors should be sent. ```rust pub fn return_path(&self) -> &HeaderValue<'x> ``` -------------------------------- ### MessageStream::seek_next_part_offset Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Seeks to the next MIME part and returns its starting offset. ```APIDOC ## MessageStream::seek_next_part_offset ### Description Seeks to the next MIME part and returns its starting offset. ### Method `pub fn seek_next_part_offset(&mut self, boundary: &[u8]) -> Option` ### Parameters - **boundary** (`&[u8]`) - The boundary string for the MIME part. ### Returns An `Option` containing the starting offset of the next part if found, otherwise `None`. ``` -------------------------------- ### Get Attachment Name Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Returns the suggested filename for the part if it is intended as an attachment. This is often derived from the Content-Disposition header. ```rust fn attachment_name(&self) -> Option<&str> ``` -------------------------------- ### Run Test Suite Source: https://docs.rs/mail-parser/latest/mail_parser/index.html Command to execute the library's test suite. Use `--all-features` to include all optional features. ```bash $ cargo test --all-features ``` -------------------------------- ### Seek Next MIME Part Offset Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Finds the starting offset of the next MIME part, delimited by the provided boundary. ```rust pub fn seek_next_part_offset(&mut self, boundary: &[u8]) -> Option ``` -------------------------------- ### Run Benchmarks Source: https://docs.rs/mail-parser/latest/mail_parser/index.html Command to run the library's benchmarks. Use `--all-features` to include all optional features. Requires the nightly toolchain. ```bash $ cargo +nightly bench --all-features ``` -------------------------------- ### Get Protocol Used for Reception Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the protocol that was used to receive the email message. ```rust pub fn with(&self) -> Option ``` -------------------------------- ### Create a new MessageParser Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessageParser.html Instantiate a new MessageParser with default settings. Default settings include parsing IANA-registered headers with their specific parsers and other headers as raw strings. ```rust pub fn new() -> Self ``` -------------------------------- ### Get Content Type Source: https://docs.rs/mail-parser/latest/mail_parser/struct.ContentType.html Retrieves the main content type string from a ContentType struct. ```rust pub fn ctype(&self) -> &str ``` -------------------------------- ### Generic From and Into Implementations Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Addr.html Demonstrates generic implementations of `From` for `T` and `Into` for `T` where `U` implements `From`. These facilitate type conversions. ```rust impl From for T ``` ```rust fn from(t: T) -> T ``` ```rust impl Into for T where U: From, ``` ```rust fn into(self) -> U ``` -------------------------------- ### Get Length of HeaderValue Source: https://docs.rs/mail-parser/latest/mail_parser/enum.HeaderValue.html Use the `len` method to get the number of items if the `HeaderValue` is a `TextList` or `Address`. Returns 0 for other variants. ```rust pub fn len(&self) -> usize ``` -------------------------------- ### list_help Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'List-Help' header field. ```APIDOC ## pub fn list_help(&self) -> &HeaderValue<'x> ### Description Returns the List-Help header field. ### Method `&self` ``` -------------------------------- ### Addr Implementations Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Addr.html Details on how the Addr struct can be cloned, compared for equality, and debug-formatted. ```APIDOC ### impl<'x> Clone for Addr<'x> * `fn clone(&self) -> Addr<'x>` - Returns a duplicate of the value. * `fn clone_from(&mut self, source: &Self)` - Performs copy-assignment from `source`. ### impl<'x> Debug for Addr<'x> * `fn fmt(&self, f: &mut Formatter<'_>) -> Result` - Formats the value using the given formatter. ### impl<'x> PartialEq for Addr<'x> * `fn eq(&self, other: &Addr<'x>) -> bool` - Tests for `self` and `other` values to be equal. * `fn ne(&self, other: &Rhs) -> bool` - Tests for `!=`. ``` -------------------------------- ### Get Raw Header Name Offset Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Header.html Returns the raw byte offset of the header name. ```rust pub fn offset_field(&self) -> u32 ``` -------------------------------- ### Get In-Reply-To Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves all 'In-Reply-To' header fields, which reference the Message-IDs of messages being replied to. ```rust pub fn in_reply_to(&self) -> &HeaderValue<'x> ``` -------------------------------- ### CloneToUninit for T (Nightly) Source: https://docs.rs/mail-parser/latest/mail_parser/struct.DateTime.html Performs copy-assignment from self to a destination pointer. This is an experimental API and requires the nightly toolchain. ```APIDOC ## unsafe fn clone_to_uninit(&self, dest: *mut u8) ### Description Performs copy-assignment from `self` to `dest`. ### Method `clone_to_uninit` ### Parameters - `self` (*&self*): An immutable reference to the object. - `dest` (**mut u8*): A mutable pointer to the destination memory location. ``` -------------------------------- ### Get HeaderValue as Received Reference Source: https://docs.rs/mail-parser/latest/mail_parser/enum.HeaderValue.html Use `as_received` to get an `Option<&Received<'x>>` reference if the `HeaderValue` is `Received`. Returns `None` otherwise. ```rust pub fn as_received(&self) -> Option<&Received<'x>> ``` -------------------------------- ### TryInto::try_into Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Performs the conversion. ```APIDOC ## TryInto::try_into ### Description Performs the conversion. ### Signature `fn try_into(self) -> Result>::Error>` ### Associated Type - `Error = >::Error` ``` -------------------------------- ### Get List-Post Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'List-Post' header field, which indicates how to post messages to the mailing list. ```rust pub fn list_post(&self) -> &HeaderValue<'x> ``` -------------------------------- ### Addr PartialEq Implementation Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Addr.html Allows comparison of two Addr instances for equality. The `eq` method tests for equality, while `ne` tests for inequality. ```rust fn eq(&self, other: &Addr<'x>) -> bool ``` ```rust fn ne(&self, other: &Rhs) -> bool ``` -------------------------------- ### Get HeaderValue as Text Slice Source: https://docs.rs/mail-parser/latest/mail_parser/enum.HeaderValue.html Use `as_text` to get an `Option<&str>` reference to the text if the `HeaderValue` is `Text`. Returns `None` otherwise. ```rust pub fn as_text(&self) -> Option<&str> ``` -------------------------------- ### GetHeader Trait Methods Source: https://docs.rs/mail-parser/latest/mail_parser/trait.GetHeader.html This trait defines two methods for accessing email headers: `header_value` to get the value of a specific header, and `header` to get the entire header object. ```APIDOC ## Trait GetHeader Provides methods to retrieve header information. ### Methods #### `fn header_value(&self, name: &HeaderName<'_>) -> Option<&HeaderValue<'x>>` Retrieves the value of a specific header by its name. #### `fn header(&self, name: impl Into>) -> Option<&Header<'x>>` Retrieves the entire header object by its name. ``` -------------------------------- ### Get HeaderValue as Text List Slice Source: https://docs.rs/mail-parser/latest/mail_parser/enum.HeaderValue.html Use `as_text_list` to get an `Option<&[Cow<'x, str>]>` reference to the text list if the `HeaderValue` is `TextList`. Returns `None` otherwise. ```rust pub fn as_text_list(&self) -> Option<&[Cow<'x, str>]> ``` -------------------------------- ### TryFrom::try_from Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Performs the conversion. ```APIDOC ## TryFrom::try_from ### Description Performs the conversion. ### Signature `fn try_from(value: U) -> Result>::Error>` ### Associated Type - `Error = Infallible` ### Constraints - `U: Into` ``` -------------------------------- ### Get MIME-Version Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'MIME-Version' header field, indicating the version of MIME standards used. This is typically '1.0'. ```rust pub fn mime_version(&self) -> &HeaderValue<'x> ``` -------------------------------- ### Configure Minimal headers parsing Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessageParser.html Enable parsing for a subset of MIME headers plus essential headers like Date, From, Reply-To, To, Cc, and Bcc. ```rust pub fn with_minimal_headers(self) -> Self ``` -------------------------------- ### Any::type_id Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Gets the TypeId of self. ```APIDOC ## Any::type_id ### Description Gets the `TypeId` of `self`. ### Signature `fn type_id(&self) -> TypeId` ### Constraints - `T: 'static + ?Sized` ``` -------------------------------- ### take Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Creates an iterator that yields at most the first `n` elements of the original iterator. ```APIDOC ## take(self, n: usize) -> Take ### Description Creates an iterator that yields the first `n` elements, or fewer if the underlying iterator ends sooner. ### Parameters - **n** (usize): The maximum number of elements to yield. ``` -------------------------------- ### Handle Nested Messages and Attachments Source: https://docs.rs/mail-parser/latest/mail_parser/index.html Demonstrates how to access nested messages within an email and extract their content. Also shows how to get the size of an attachment and its decoded name, supporting RFC2231 continuations and character sets. ```rust // Supports nested messages as well as multipart/digest let nested_message = message .attachment(0) .unwrap() .message() .unwrap(); assert_eq!( nested_message.subject().unwrap(), "Exporting my book about coffee tables" ); // Handles UTF-* as well as many legacy encodings assert_eq!( nested_message.body_text(0).unwrap(), "β„Œπ”’π”©π”­ π”ͺ𝔒 𝔒𝔡𝔭𝔬𝔯𝔱 π”ͺ𝔢 π”Ÿπ”¬π”¬π”¨ π”­π”©π”’π”žπ”°π”’!" ); assert_eq!( nested_message.body_html(0).unwrap(), "β„Œπ”’π”©π”­ π”ͺ𝔒 𝔒𝔡𝔭𝔬𝔯𝔱 π”ͺ𝔢 π”Ÿπ”¬π”¬π”¨ π”­π”©π”’π”žπ”°π”’!" ); let nested_attachment = nested_message.attachment(0).unwrap(); assert_eq!(nested_attachment.len(), 42); // Full RFC2231 support for continuations and character sets assert_eq!( nested_attachment.attachment_name().unwrap(), "Book about β˜• tables.gif" ); ``` -------------------------------- ### From for T Source: https://docs.rs/mail-parser/latest/mail_parser/struct.DateTime.html Creates a new instance of T from an existing instance of T. ```APIDOC ## fn from(t: T) -> T ### Description Returns the argument unchanged. ### Method `from` ### Parameters - `t` (T): The value to convert. ### Returns - T: The original value. ``` -------------------------------- ### raw_body_offset() Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Get the raw body offset of this part. ```APIDOC #### pub fn raw_body_offset(&self) -> u32 ``` -------------------------------- ### raw_header_offset() Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Get the raw header offset of this part. ```APIDOC #### pub fn raw_header_offset(&self) -> u32 ``` -------------------------------- ### Get Content-Disposition Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Retrieves the Content-Disposition field, which describes how the part should be presented (e.g., inline or attachment). ```rust fn content_disposition(&self) -> Option<&ContentType<'x>> ``` -------------------------------- ### raw_end_offset() Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Get the raw body end offset of this part. ```APIDOC #### pub fn raw_end_offset(&self) -> u32 ``` -------------------------------- ### Configure Date headers parsing Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessageParser.html Enable parsing for Date headers such as Date and Resent-Date. ```rust pub fn with_date_headers(self) -> Self ``` -------------------------------- ### fold(self, init: B, f: F) Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.MessageIterator.html Folds every element into an accumulator by applying an operation, returning the final result. ```APIDOC ## fold(self, init: B, f: F) ### Description Folds every element into an accumulator by applying an operation, returning the final result. ### Method Iterator method ### Parameters #### Path Parameters - **init** (B) - Required - The initial value for the accumulator. - **f** (F) - Required - A closure that takes the accumulator and the current item, returning the updated accumulator. ``` -------------------------------- ### Get All Attributes Source: https://docs.rs/mail-parser/latest/mail_parser/struct.ContentType.html Retrieves a slice of all attributes present in a ContentType struct. ```rust pub fn attributes(&self) -> Option<&[Attribute<'x>]> ``` -------------------------------- ### Into::into Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Calls U::from(self). ```APIDOC ## Into::into ### Description Calls `U::from(self)`. That is, this conversion is whatever the implementation of `From for U` chooses to do. ### Signature `fn into(self) -> U` ### Constraints - `U: From` ``` -------------------------------- ### Get First Address Source: https://docs.rs/mail-parser/latest/mail_parser/enum.Address.html Returns the first address from the list or the first address within the first group. Returns None if the list or group is empty. ```rust pub fn first(&self) -> Option<&Addr<'x>> ``` -------------------------------- ### Configure Address headers parsing Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessageParser.html Enable parsing for all address-related headers, including From, To, Cc, Bcc, and their resent variants. ```rust pub fn with_address_headers(self) -> Self ``` -------------------------------- ### Get Header Values by Form Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves all values for a given header, parsed according to a specified format. Useful for headers that can appear multiple times or have structured content. ```rust pub fn header_as( &self, header: impl Into>, form: HeaderForm, ) -> Vec> ``` -------------------------------- ### take Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.FolderIterator.html Creates an iterator that yields the first `n` elements, or fewer if the underlying iterator ends sooner. ```APIDOC ## fn take(self, n: usize) -> Take ### Description Creates an iterator that yields the first `n` elements, or fewer if the underlying iterator ends sooner. Read more ### Parameters #### Path Parameters - `n` (usize): The maximum number of elements to yield. ``` -------------------------------- ### Get Message Creation Date Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/mbox/struct.Message.html Retrieves the message creation date as UTC seconds since the UNIX epoch. ```rust pub fn internal_date(&self) -> u64 ``` -------------------------------- ### MessageParser::new Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessageParser.html Creates a new builder for a message parser with default settings. Default settings include parsing IANA-registered headers with their specific parsers and other headers as raw. ```APIDOC ## MessageParser::new ### Description Creates a new builder for a message parser using the default settings. ### Method ```rust pub fn new() -> Self ``` ### Returns A new `MessageParser` instance with default configuration. ``` -------------------------------- ### Get Remaining Bytes Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Returns the number of bytes remaining in the message stream. ```rust pub fn remaining(&self) -> usize ``` -------------------------------- ### Addr::new Constructor Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Addr.html Creates a new Addr instance. It takes an optional name and a required address string. The lifetime 'x ensures that the string slices do not outlive the input. ```rust pub fn new(name: Option<&'x str>, address: &'x str) -> Self ``` -------------------------------- ### Get Message Headers Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Retrieves a slice of all headers associated with this message part. ```rust pub fn headers(&self) -> &[Header<'x>] ``` -------------------------------- ### Get Julian Day Source: https://docs.rs/mail-parser/latest/mail_parser/struct.DateTime.html Returns the Julian day number for the DateTime object. ```rust pub fn julian_day(&self) -> i64 ``` -------------------------------- ### FolderIterator zip() Method Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.FolderIterator.html Creates an iterator that yields pairs of elements, one from this iterator and one from another. ```rust fn zip(self, other: U) -> Zip::IntoIter> where Self: Sized, U: IntoIterator, ``` -------------------------------- ### Get Link Type Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the link type over which the email message was received. ```rust pub fn via(&self) -> Option<&str> ``` -------------------------------- ### partition(f: F) Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.MessageIterator.html Consumes an iterator, creating two collections from it. ```APIDOC ## partition(f: F) ### Description Consumes an iterator, creating two collections from it. ### Method Iterator method ### Parameters #### Path Parameters - **f** (F) - Required - A closure that returns `true` for elements to be placed in the first collection, and `false` for the second. ``` -------------------------------- ### Get Sender Identity Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the identity of the user that sent the email message. ```rust pub fn ident(&self) -> Option<&str> ``` -------------------------------- ### Get Message ID Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the unique message ID of the email that was received. ```rust pub fn id(&self) -> Option<&str> ``` -------------------------------- ### Run Test Suite with MIRI Source: https://docs.rs/mail-parser/latest/mail_parser/index.html Command to run the test suite using MIRI, Rust's interpreter for detecting undefined behavior. Requires the nightly toolchain. ```bash $ cargo +nightly miri test --all-features ``` -------------------------------- ### FolderIterator step_by() Method Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.FolderIterator.html Creates an iterator that yields elements from the original iterator, but steps by a specified amount. ```rust fn step_by(self, step: usize) -> StepBy where Self: Sized, ``` -------------------------------- ### Get Bytes in Range Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Retrieves a slice of bytes within a specified range from the stream. ```rust pub fn bytes(&self, range: Range) -> &'x [u8] ``` -------------------------------- ### Get Return Address Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the return address for bounce messages. It checks the 'Return-Path' header first, then falls back to the 'From' header. ```rust pub fn return_address(&self) -> Option<&str> ``` -------------------------------- ### partition Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/mbox/struct.MessageIterator.html Consumes an iterator, creating two collections from it. ```APIDOC ## fn partition(self, f: F) -> (B, B) where Self: Sized, B: Default + Extend, F: FnMut(&Self::Item) -> bool ``` -------------------------------- ### Get Current Offset Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Returns the current position (offset) within the message stream. ```rust pub fn offset(&self) -> usize ``` -------------------------------- ### Create New FolderIterator Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.FolderIterator.html Creates a new Maildir folder iterator. Use Some(".") for Maildir++ and None for Dovecot LAYOUT=fs. ```rust pub fn new( path: impl Into, sub_folder_prefix: Option<&str>, ) -> Result> ``` -------------------------------- ### Try Convert From Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Header.html Attempts to convert a value into a Header. ```rust fn try_from(value: U) -> Result>::Error> ``` -------------------------------- ### return_path Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves all 'Return-Path' header fields. ```APIDOC ## pub fn return_path(&self) -> &HeaderValue<'x> ### Description Returns all Return-Path header fields. ### Method `&self` ``` -------------------------------- ### take(n: usize) Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.MessageIterator.html Creates an iterator that yields the first `n` elements, or fewer if the underlying iterator ends sooner. ```APIDOC ## take(n: usize) ### Description Creates an iterator that yields the first `n` elements, or fewer if the underlying iterator ends sooner. ### Method Iterator method ### Parameters #### Path Parameters - **n** (usize) - Required - The maximum number of elements to yield. ``` -------------------------------- ### Get Recipient Email Address Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the email address of the user for whom the message was received. ```rust pub fn for_(&self) -> Option<&str> ``` -------------------------------- ### Get Attribute by Name Source: https://docs.rs/mail-parser/latest/mail_parser/struct.ContentType.html Retrieves a specific attribute value by its name from a ContentType struct. ```rust pub fn attribute(&self, name: &str) -> Option<&str> ``` -------------------------------- ### PartialEq Host Implementation Source: https://docs.rs/mail-parser/latest/mail_parser/enum.Host.html Defines equality comparison for Host enum variants. This allows checking if two Host values are equal using the `==` and `!=` operators. ```rust fn eq(&self, other: &Host<'x>) -> bool ``` ```rust fn ne(&self, other: &Rhs) -> bool ``` -------------------------------- ### Get Message Contents as Byte Slice Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/mbox/struct.Message.html Returns the raw message contents as a byte slice. Use this when you only need to read the contents without taking ownership. ```rust pub fn contents(&self) -> &[u8] ``` -------------------------------- ### preview_html Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/preview/index.html Generates an HTML preview of the email content. ```APIDOC ## preview_html ### Description Generates an HTML preview of the email content. ### Function Signature `pub fn preview_html(html: &str) -> String` ### Parameters * `html` (string) - The HTML content to preview. ``` -------------------------------- ### Get Raw Offset End Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Header.html Returns the raw byte offset where the header ends. ```rust pub fn offset_end(&self) -> u32 ``` -------------------------------- ### by_ref() Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.MessageIterator.html Creates a β€œby reference” adapter for this instance of `Iterator`. ```APIDOC ## by_ref() ### Description Creates a β€œby reference” adapter for this instance of `Iterator`. ### Method Iterator method ``` -------------------------------- ### Get Content Subtype Source: https://docs.rs/mail-parser/latest/mail_parser/struct.ContentType.html Retrieves the optional content subtype string from a ContentType struct. ```rust pub fn subtype(&self) -> Option<&str> ``` -------------------------------- ### Try Convert Into Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Header.html Attempts to convert a Header into another type. ```rust fn try_into(self) -> Result>::Error> ``` -------------------------------- ### Generic Blanket Implementations for Addr Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Addr.html Shows blanket implementations for generic traits like Any, Borrow, and CloneToUninit, which apply to Addr due to its generic nature. ```rust impl Any for T where T: 'static + ?Sized, ``` ```rust fn type_id(&self) -> TypeId ``` ```rust impl Borrow for T where T: ?Sized, ``` ```rust fn borrow(&self) -> &T ``` ```rust impl BorrowMut for T where T: ?Sized, ``` ```rust fn borrow_mut(&mut self) -> &mut T ``` ```rust impl CloneToUninit for T where T: Clone, ``` ```rust unsafe fn clone_to_uninit(&self, dest: *mut u8) ``` -------------------------------- ### Get Resent-Message-ID Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves all 'Resent-Message-ID' header fields, providing the Message-ID of a resent message. ```rust pub fn resent_message_id(&self) -> &HeaderValue<'x> ``` -------------------------------- ### as_str Method Source: https://docs.rs/mail-parser/latest/mail_parser/enum.TlsVersion.html Converts a TlsVersion variant to its string representation. ```APIDOC ## impl TlsVersion ### pub fn as_str(&self) -> &'static str Converts the TlsVersion variant to its static string slice representation. ``` -------------------------------- ### Get Resent-From Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'Resent-From' header field, indicating the sender of a resent message. ```rust pub fn resent_from(&self) -> Option<&Address<'x>> ``` -------------------------------- ### Get List-ID Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'List-ID' header field, which uniquely identifies a mailing list. ```rust pub fn list_id(&self) -> &HeaderValue<'x> ``` -------------------------------- ### PartialEq Implementation for Greeting Source: https://docs.rs/mail-parser/latest/mail_parser/enum.Greeting.html Allows comparison of Greeting enum variants for equality. ```rust fn eq(&self, other: &Greeting) -> bool ``` ```rust fn ne(&self, other: &Rhs) -> bool ``` -------------------------------- ### Configure Message ID headers parsing Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessageParser.html Enable parsing for message ID headers like Message-Id, In-Reply-To, and References. ```rust pub fn with_message_ids(self) -> Self ``` -------------------------------- ### Preview Generation Functions Source: https://docs.rs/mail-parser/latest/mail_parser/all.html Provides functions for generating HTML and text previews, and truncating content. ```APIDOC ## `preview_html` ### Description Generates an HTML preview from a given HTML string. ### Function Signature `pub fn preview_html(html: &str, max_len: usize) -> String` ## `preview_text` ### Description Generates a plain text preview from a given text string. ### Function Signature `pub fn preview_text(text: &str, max_len: usize) -> String` ## `truncate_html` ### Description Truncates an HTML string to a maximum length. ### Function Signature `pub fn truncate_html(html: &str, max_len: usize) -> String` ## `truncate_text` ### Description Truncates a plain text string to a maximum length. ### Function Signature `pub fn truncate_text(text: &str, max_len: usize) -> String` ``` -------------------------------- ### Get HELO Command Greeting Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the HELO/EHLO/LHLO command that was sent by the client during email reception. ```rust pub fn helo_cmd(&self) -> Option ``` -------------------------------- ### Greeting as_str Method Source: https://docs.rs/mail-parser/latest/mail_parser/enum.Greeting.html Converts a Greeting enum variant to its string representation. ```rust pub fn as_str(&self) -> &'static str ``` -------------------------------- ### Get TLS Cipher Used Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the TLS cipher that was used during the reception of the email message. ```rust pub fn tls_cipher(&self) -> Option<&str> ``` -------------------------------- ### FolderIterator size_hint() Method Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.FolderIterator.html Returns the lower and upper bounds of the remaining elements in the iterator. ```rust fn size_hint(&self) -> (usize, Option) ``` -------------------------------- ### Get TLS Version Used Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the TLS version that was used during the reception of the email message. ```rust pub fn tls_version(&self) -> Option ``` -------------------------------- ### by_ref Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/mbox/struct.MessageIterator.html Creates a β€œby reference” adapter for this instance of `Iterator`. ```APIDOC ## fn by_ref(&mut self) -> &mut Self where Self: Sized ``` -------------------------------- ### Get Sender IP Address Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the IP address of the machine that originated the email message. ```rust pub fn from_ip(&self) -> Option ``` -------------------------------- ### Configure MIME headers parsing Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessageParser.html Enable parsing for specific MIME headers like Content-Type and Content-Disposition. This is necessary for parsing message bodies. ```rust pub fn with_mime_headers(self) -> Self ``` -------------------------------- ### Get Message Sender Address Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/mbox/struct.Message.html Returns the sender's email address as a string slice. ```rust pub fn from(&self) -> &str ``` -------------------------------- ### preview_html Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/preview/fn.preview_html.html The `preview_html` function is used to create a shortened version of an HTML string, limiting its length to a specified maximum. This is useful for generating snippets or previews of HTML content. ```APIDOC ## Function preview_html ### Description Generates an HTML preview from a given HTML string, truncating it to a specified maximum length. ### Signature ```rust pub fn preview_html<'x>(html: Cow<'_, str>, max_len: usize) -> Cow<'x, str> ``` ### Parameters * `html` (Cow<'_, str>): The input HTML string. * `max_len` (usize): The maximum length of the preview string. ### Returns (Cow<'x, str>): The generated HTML preview string. ``` -------------------------------- ### Addr Clone Implementation Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Addr.html Provides the ability to clone an Addr instance. The `clone` method creates a deep copy, while `clone_from` performs copy-assignment. ```rust fn clone(&self) -> Addr<'x> ``` ```rust fn clone_from(&mut self, source: &Self) ``` -------------------------------- ### Sync Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Auto trait implementation for Sync. ```APIDOC ## Sync ### Description Auto trait implementation for Sync. ### Implementation `impl<'x> Sync for MessageStream<'x>` ``` -------------------------------- ### Get Resent-To Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'Resent-To' header field, indicating the primary recipients of a resent message. ```rust pub fn resent_to(&self) -> Option<&Address<'x>> ``` -------------------------------- ### Get Resent-Sender Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'Resent-Sender' header field, indicating the agent or system that resent the message. ```rust pub fn resent_sender(&self) -> Option<&Address<'x>> ``` -------------------------------- ### StructuralPartialEq Host Implementation Source: https://docs.rs/mail-parser/latest/mail_parser/enum.Host.html Indicates that the Host enum supports structural equality comparison. ```rust impl<'x> StructuralPartialEq for Host<'x> ``` -------------------------------- ### Get Resent-Date Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves all 'Resent-Date' header fields, indicating when a resent message was originally sent. ```rust pub fn resent_date(&self) -> &HeaderValue<'x> ``` -------------------------------- ### HeaderName Equality and Ordering Source: https://docs.rs/mail-parser/latest/mail_parser/enum.HeaderName.html Methods for testing equality and ordering between HeaderName values. ```APIDOC ## fn eq(&self, other: &Self) -> bool Tests for `self` and `other` values to be equal. ### Method `eq` ### Parameters - `self`: The first HeaderName value. - `other`: The second HeaderName value. ### Returns - `bool`: `true` if the values are equal, `false` otherwise. ``` ```APIDOC ## fn ne(&self, other: &Rhs) -> bool Tests for inequality between `self` and `other` values. ### Method `ne` ### Parameters - `self`: The first HeaderName value. - `other`: The second HeaderName value. ### Returns - `bool`: `true` if the values are not equal, `false` otherwise. ``` ```APIDOC ## fn partial_cmp(&self, other: &HeaderName<'x>) -> Option Returns an ordering between `self` and `other` values if one exists. ### Method `partial_cmp` ### Parameters - `self`: The first HeaderName value. - `other`: The second HeaderName value. ### Returns - `Option`: An `Ordering` enum variant if the values can be ordered, `None` otherwise. ``` ```APIDOC ## fn lt(&self, other: &Rhs) -> bool Tests if `self` is less than `other`. ### Method `lt` ### Parameters - `self`: The first HeaderName value. - `other`: The second HeaderName value. ### Returns - `bool`: `true` if `self` is less than `other`, `false` otherwise. ``` ```APIDOC ## fn le(&self, other: &Rhs) -> bool Tests if `self` is less than or equal to `other`. ### Method `le` ### Parameters - `self`: The first HeaderName value. - `other`: The second HeaderName value. ### Returns - `bool`: `true` if `self` is less than or equal to `other`, `false` otherwise. ``` ```APIDOC ## fn gt(&self, other: &Rhs) -> bool Tests if `self` is greater than `other`. ### Method `gt` ### Parameters - `self`: The first HeaderName value. - `other`: The second HeaderName value. ### Returns - `bool`: `true` if `self` is greater than `other`, `false` otherwise. ``` ```APIDOC ## fn ge(&self, other: &Rhs) -> bool Tests if `self` is greater than or equal to `other`. ### Method `ge` ### Parameters - `self`: The first HeaderName value. - `other`: The second HeaderName value. ### Returns - `bool`: `true` if `self` is greater than or equal to `other`, `false` otherwise. ``` -------------------------------- ### Default MessagePart Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Creates a default `MessagePart` instance. This is typically an empty part with default values. ```rust fn default() -> MessagePart<'x> ``` -------------------------------- ### Get List-Owner Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'List-Owner' header field, which provides an email address for the list administrator. ```rust pub fn list_owner(&self) -> &HeaderValue<'x> ``` -------------------------------- ### preview_text Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/preview/index.html Generates a plain text preview of the email content. ```APIDOC ## preview_text ### Description Generates a plain text preview of the email content. ### Function Signature `pub fn preview_text(text: &str) -> String` ### Parameters * `text` (string) - The plain text content to preview. ``` -------------------------------- ### Get Comments Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves all 'Comments' header fields. This header is often used for explanatory remarks. ```rust pub fn comments(&self) -> &HeaderValue<'x> ``` -------------------------------- ### product Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.MessageIterator.html Iterates over the entire iterator, multiplying all the elements. ```APIDOC ## fn product

(self) -> P where Self: Sized, P: Product, Iterates over the entire iterator, multiplying all the elements. ``` -------------------------------- ### CloneToUninit Trait Implementation (Nightly) Source: https://docs.rs/mail-parser/latest/mail_parser/enum.Greeting.html Performs copy-assignment to uninitialized memory. This is an experimental API. ```rust unsafe fn clone_to_uninit(&self, dest: *mut u8) ``` -------------------------------- ### Get HELO Hostname or IP Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the HELO/EHLO/LHLO hostname or IP address of the machine that sent the email. ```rust pub fn helo(&self) -> Option<&Host<'x>> ``` -------------------------------- ### Get Receiver Hostname or IP Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the hostname or IP address of the machine that received the email message. ```rust pub fn by(&self) -> Option<&Host<'x>> ``` -------------------------------- ### Get Sender Hostname or IP Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the hostname or IP address of the machine that originated the email message. ```rust pub fn from(&self) -> Option<&Host<'x>> ``` -------------------------------- ### from Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'From' header field, if present. ```APIDOC ## pub fn from(&self) -> Option<&Address<'x>> ### Description Returns the From header field. ### Method `&self` ``` -------------------------------- ### From::from Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Returns the argument unchanged. ```APIDOC ## From::from ### Description Returns the argument unchanged. ### Signature `fn from(t: T) -> T` ``` -------------------------------- ### Get List-Archive Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'List-Archive' header field, which provides a URL to an archive of the mailing list messages. ```rust pub fn list_archive(&self) -> &HeaderValue<'x> ``` -------------------------------- ### Get From Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'From' header field, indicating the sender of the message. Returns None if the header is absent. ```rust pub fn from(&self) -> Option<&Address<'x>> ``` -------------------------------- ### partition Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Consumes an iterator, creating two collections from it based on a predicate. Available since 1.0.0. ```APIDOC ## partition ### Description Consumes an iterator, creating two collections from it. Elements for which the predicate returns `true` are placed in the first collection, and the rest in the second. ### Signature `fn partition(&mut self, f: F) -> (B, B)` ### Type Parameters - `B`: The type of the collections to create. Must implement `Default` and `Extend`. - `F`: The type of the predicate function. Takes a reference to an item and returns a boolean. ### Constraints - `Self: Sized` - `B: Default + Extend` - `F: FnMut(&Self::Item) -> bool` ### Parameters - `f`: A mutable closure that takes a reference to an item and returns `true` if the item should be placed in the first collection, `false` otherwise. ``` -------------------------------- ### Get Parsed Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves a specific parsed header from the message by its name. Returns None if the header is not found. ```rust pub fn header( &self, header: impl Into>, ) -> Option<&HeaderValue<'x>> ``` -------------------------------- ### Header Trait Implementations Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Header.html Details the trait implementations for the Header struct, including Clone, Debug, PartialEq, Eq, and StructuralPartialEq. ```APIDOC ## Header Trait Implementations ### `Clone` - `clone()`: Returns a duplicate of the value. - `clone_from()`: Performs copy-assignment from `source`. ### `Debug` - `fmt()`: Formats the value using the given formatter. ### `PartialEq` - `eq()`: Tests for `self` and `other` values to be equal. - `ne()`: Tests for `!=`. ### `Eq` ### `StructuralPartialEq` ``` -------------------------------- ### Try Next Is Space Source: https://docs.rs/mail-parser/latest/mail_parser/parsers/struct.MessageStream.html Attempts to consume the next byte if it is a whitespace character. ```rust pub fn try_next_is_space(&mut self) -> bool ``` -------------------------------- ### Get Content-Language Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Retrieves the Content-Language header field, specifying the natural language(s) of the part's content. ```rust fn content_language(&self) -> &HeaderValue<'x> ``` -------------------------------- ### FolderIterator next_chunk() Method (Nightly) Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.FolderIterator.html Advances the iterator and returns an array of N items. This is a nightly-only experimental API. ```rust fn next_chunk( &mut self, ) -> Result<[Self::Item; N], IntoIter> where Self: Sized, ``` -------------------------------- ### Get Content-Type Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Retrieves the Content-Type field, which specifies the media type of the part (e.g., text/plain, image/jpeg). ```rust fn content_type(&self) -> Option<&ContentType<'x>> ``` -------------------------------- ### Get Last Element Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.MessageIterator.html Consumes the iterator and returns the last element yielded. Returns None if the iterator was empty. ```rust fn last(self) -> Option where Self: Sized, ``` -------------------------------- ### map_windows(f: F) Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.MessageIterator.html Calls the given function `f` for each contiguous window of size `N` over `self` and returns an iterator over the outputs of `f`. Like `slice::windows()`, the windows during mapping overlap as well. ```APIDOC ## map_windows(f: F) ### Description Calls the given function `f` for each contiguous window of size `N` over `self` and returns an iterator over the outputs of `f`. Like `slice::windows()`, the windows during mapping overlap as well. ### Method Iterator method ### Parameters #### Path Parameters - **f** (F) - Required - A closure that takes a slice representing the window and returns a value. ``` -------------------------------- ### Default header parsing to ignore Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessageParser.html Configure the parser to ignore and skip parsing all other unconfigured headers. ```rust pub fn default_header_ignore(self) -> Self ``` -------------------------------- ### Get Raw Body Length Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Returns the raw length of the message part's body in bytes, before any decoding. ```rust pub fn raw_len(&self) -> u32 ``` -------------------------------- ### Get Sub-Part IDs Source: https://docs.rs/mail-parser/latest/mail_parser/struct.MessagePart.html Retrieves the identifiers for any sub-parts of a multipart MIME message. Returns None if the part is not multipart. ```rust pub fn sub_parts(&self) -> Option<&[MessagePartId]> ``` -------------------------------- ### Sync Implementation for Greeting Source: https://docs.rs/mail-parser/latest/mail_parser/enum.Greeting.html Indicates that Greeting enum variants can be shared between threads. ```rust impl Sync for Greeting ``` -------------------------------- ### Get Day of Week Source: https://docs.rs/mail-parser/latest/mail_parser/struct.DateTime.html Returns the day of the week as a number, where 0 represents Sunday and 6 represents Saturday. ```rust pub fn day_of_week(&self) -> u8 ``` -------------------------------- ### map_windows Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.FolderIterator.html Calls a function for each contiguous window of size `N` over the iterator and returns an iterator over the results. This is an experimental API. ```APIDOC ## fn map_windows(self, f: F) -> MapWindows ### Description Calls the given function `f` for each contiguous window of size `N` over `self` and returns an iterator over the outputs of `f`. Like `slice::windows()`, the windows during mapping overlap as well. Read more ### Parameters #### Path Parameters - `f` (F): A closure that takes a slice representing the window and returns a value `R`. ``` -------------------------------- ### Get Sender Reverse DNS Hostname Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Received.html Retrieves the reverse DNS hostname of the machine that originated the email message. ```rust pub fn from_iprev(&self) -> Option<&str> ``` -------------------------------- ### Get HeaderName ID Source: https://docs.rs/mail-parser/latest/mail_parser/enum.HeaderName.html Returns a unique `u8` identifier for the header name. This can be used for internal mapping or optimization. ```rust pub fn id(&self) -> u8 ``` -------------------------------- ### to Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'To' header field, if present. ```APIDOC ## pub fn to(&self) -> Option<&Address<'x>> ### Description Returns the To header field. ### Method `&self` ``` -------------------------------- ### Generic ToOwned and TryFrom/TryInto Implementations Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Addr.html Covers generic implementations for `ToOwned`, `TryFrom`, and `TryInto`. `ToOwned` allows creating owned data from borrowed data, while `TryFrom`/`TryInto` enable fallible conversions. ```rust impl ToOwned for T where T: Clone, ``` ```rust type Owned = T ``` ```rust fn to_owned(&self) -> T ``` ```rust fn clone_into(&self, target: &mut T) ``` ```rust impl TryFrom for T where U: Into, ``` ```rust type Error = Infallible ``` ```rust fn try_from(value: U) -> Result>::Error> ``` ```rust impl TryInto for T where U: TryFrom, ``` ```rust type Error = >::Error ``` ```rust fn try_into(self) -> Result>::Error> ``` -------------------------------- ### Address Methods Source: https://docs.rs/mail-parser/latest/mail_parser/enum.Address.html Provides methods for interacting with the Address enum, such as retrieving the first or last address, converting to a list or group, and iterating over addresses. ```APIDOC ## impl<'x> Address<'x> ### `first()` Returns the first address in the list, or the first address in the first group. ```rust pub fn first(&self) -> Option<&Addr<'x>> ``` ### `last()` Returns the last address in the list, or the last address in the last group. ```rust pub fn last(&self) -> Option<&Addr<'x>> ``` ### `into_list()` Converts the address into a list of `Addr`. ```rust pub fn into_list(self) -> Vec> ``` ### `into_group()` Converts the address into a group of `Addr`. ```rust pub fn into_group(self) -> Vec> ``` ### `as_list()` Returns the list of addresses, or `None` if the address is a group. ```rust pub fn as_list(&self) -> Option<&[Addr<'x>]> ``` ### `as_group()` Returns the group of addresses, or `None` if the address is a list. ```rust pub fn as_group(&self) -> Option<&[Group<'x>]> ``` ### `iter()` Returns an iterator over the addresses in the list, or the addresses in the groups. ```rust pub fn iter( &self, ) -> Box> + Sync + Send + '_> ``` ### `contains()` Returns whether the list contains the given address. ```rust pub fn contains(&self, addr: &str) -> bool ``` ### `into_owned()` Converts the address into an owned `Address` with a static lifetime. ```rust pub fn into_owned(self) -> Address<'static> ``` ``` -------------------------------- ### html_part Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves an inline HTML body part by its position. Use this to get specific HTML sections within the message. ```APIDOC ## html_part ### Description Returns an inline HTML body part by position. ### Method Signature `pub fn html_part(&self, pos: u32) -> Option<&MessagePart<'x>>` ### Parameters * `pos` (u32) - The position of the HTML body part. ``` -------------------------------- ### FolderIterator advance_by() Method (Nightly) Source: https://docs.rs/mail-parser/latest/mail_parser/mailbox/maildir/struct.FolderIterator.html Advances the iterator by a specified number of elements. This is a nightly-only experimental API. ```rust fn advance_by(&mut self, n: usize) -> Result<(), NonZero> ``` -------------------------------- ### Get To Header Source: https://docs.rs/mail-parser/latest/mail_parser/struct.Message.html Retrieves the 'To' header field, containing the primary recipients of the message. Returns None if the header is absent. ```rust pub fn to(&self) -> Option<&Address<'x>> ``` -------------------------------- ### StructuralPartialEq Implementation for Greeting Source: https://docs.rs/mail-parser/latest/mail_parser/enum.Greeting.html Enables structural equality checks for Greeting enum variants. ```rust impl StructuralPartialEq for Greeting ```