#[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§

source§

impl<'a> NameAttribute<'a>

source

pub fn into_owned(self) -> NameAttribute<'static>

Trait Implementations§

source§

impl<'a> Clone for NameAttribute<'a>

source§

fn clone(&self) -> NameAttribute<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for NameAttribute<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'a> PartialEq for NameAttribute<'a>

source§

fn eq(&self, other: &NameAttribute<'a>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> Eq for NameAttribute<'a>

source§

impl<'a> StructuralPartialEq for NameAttribute<'a>

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for NameAttribute<'a>

§

impl<'a> Send for NameAttribute<'a>

§

impl<'a> Sync for NameAttribute<'a>

§

impl<'a> Unpin for NameAttribute<'a>

§

impl<'a> UnwindSafe for NameAttribute<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more