#[non_exhaustive]
pub enum NameAttribute<'a> {
    NoInferiors,
    NoSelect,
    Marked,
    Unmarked,
    All,
    Archive,
    Drafts,
    Flagged,
    Junk,
    Sent,
    Trash,
    Extension(Cow<'a, str>),
}
Expand description

The name attributes are returned as part of a LIST response described in RFC 3501 section 7.2.2.

This enumeration additional includes values from the extension Special-Use Mailboxes RFC 6154 section 2.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

NoInferiors

From RFC 3501 section 7.2.2:

It is not possible for any child levels of hierarchy to exist under this name; no child levels exist now and none can be created in the future.

NoSelect

From RFC 3501 section 7.2.2:

It is not possible to use this name as a selectable mailbox.

Marked

From RFC 3501 section 7.2.2:

The mailbox has been marked “interesting” by the server; the mailbox probably contains messages that have been added since the last time the mailbox was selected.

Unmarked

From RFC 3501 section 7.2.2:

The mailbox does not contain any additional messages since the last time the mailbox was selected.

All

From RFC 6154 section 2:

This mailbox presents all messages in the user’s message store. Implementations MAY omit some messages, such as, perhaps, those in \Trash and \Junk. When this special use is supported, it is almost certain to represent a virtual mailbox.

Archive

From RFC 6154 section 2:

This mailbox is used to archive messages. The meaning of an “archival” mailbox is server-dependent; typically, it will be used to get messages out of the inbox, or otherwise keep them out of the user’s way, while still making them accessible.

Drafts

From RFC 6154 section 2:

This mailbox is used to hold draft messages – typically, messages that are being composed but have not yet been sent. In some server implementations, this might be a virtual mailbox, containing messages from other mailboxes that are marked with the “\Draft” message flag. Alternatively, this might just be advice that a client put drafts here.

Flagged

From RFC 6154 section 2:

This mailbox presents all messages marked in some way as “important”. When this special use is supported, it is likely to represent a virtual mailbox collecting messages (from other mailboxes) that are marked with the “\Flagged” message flag.

Junk

From RFC 6154 section 2:

This mailbox is where messages deemed to be junk mail are held. Some server implementations might put messages here automatically. Alternatively, this might just be advice to a client-side spam filter.

Sent

From RFC 6154 section 2:

This mailbox is used to hold copies of messages that have been sent. Some server implementations might put messages here automatically. Alternatively, this might just be advice that a client save sent messages here.

Trash

From RFC 6154 section 2

This mailbox is used to hold messages that have been deleted or marked for deletion. In some server implementations, this might be a virtual mailbox, containing messages from other mailboxes that are marked with the “\Deleted” message flag. Alternatively, this might just be advice that a client that chooses not to use the IMAP “\Deleted” model should use this as its trash location. In server implementations that strictly expect the IMAP “\Deleted” model, this special use is likely not to be supported.

Extension(Cow<'a, str>)

A name attribute not defined in RFC 3501 section 7.2.2 or any supported extension.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.