[][src]Enum melib::backends::imap::UntaggedResponse

pub enum UntaggedResponse<'s> {
    Expunge(MessageSequenceNumber),
    Exists(ImapNum),
    Recent(ImapNum),
    Fetch(FetchResponse<'s>),
    Bye {
        reason: &'s str,
    },
}

This enum represents the server's untagged responses detailed in 7. Server Responses of RFC 3501 INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1

Variants

Expunge(MessageSequenceNumber)
   7.4.1.  EXPUNGE Response

   The EXPUNGE response reports that the specified message sequence
   number has been permanently removed from the mailbox.  The message
   sequence number for each successive message in the mailbox is
   immediately decremented by 1, and this decrement is reflected in
   message sequence numbers in subsequent responses (including other
   untagged EXPUNGE responses).

   The EXPUNGE response also decrements the number of messages in the
   mailbox; it is not necessary to send an EXISTS response with the
   new value.

   As a result of the immediate decrement rule, message sequence
   numbers that appear in a set of successive EXPUNGE responses
   depend upon whether the messages are removed starting from lower
   numbers to higher numbers, or from higher numbers to lower
   numbers.  For example, if the last 5 messages in a 9-message
   mailbox are expunged, a "lower to higher" server will send five
   untagged EXPUNGE responses for message sequence number 5, whereas
   a "higher to lower server" will send successive untagged EXPUNGE
   responses for message sequence numbers 9, 8, 7, 6, and 5.

   An EXPUNGE response MUST NOT be sent when no command is in
   progress, nor while responding to a FETCH, STORE, or SEARCH
   command.  This rule is necessary to prevent a loss of
   synchronization of message sequence numbers between client and
   server.  A command is not "in progress" until the complete command
   has been received; in particular, a command is not "in progress"
   during the negotiation of command continuation.

        Note: UID FETCH, UID STORE, and UID SEARCH are different
        commands from FETCH, STORE, and SEARCH.  An EXPUNGE
        response MAY be sent during a UID command.

   The update from the EXPUNGE response MUST be recorded by the
   client.
Exists(ImapNum)
    7.3.1.  EXISTS Response

    The EXISTS response reports the number of messages in the mailbox.
    This response occurs as a result of a SELECT or EXAMINE command,
    and if the size of the mailbox changes (e.g., new messages).

    The update from the EXISTS response MUST be recorded by the
    client.
Recent(ImapNum)
7.3.2. RECENT Response
The RECENT response reports the number of messages with the
\Recent flag set.  This response occurs as a result of a SELECT or
EXAMINE command, and if the size of the mailbox changes (e.g., new
messages).
Fetch(FetchResponse<'s>)
Bye

Fields of Bye

reason: &'s str

Trait Implementations

impl<'s> Debug for UntaggedResponse<'s>[src]

impl<'s> PartialEq<UntaggedResponse<'s>> for UntaggedResponse<'s>[src]

impl<'s> StructuralPartialEq for UntaggedResponse<'s>[src]

Auto Trait Implementations

impl<'s> RefUnwindSafe for UntaggedResponse<'s>

impl<'s> Send for UntaggedResponse<'s>

impl<'s> Sync for UntaggedResponse<'s>

impl<'s> Unpin for UntaggedResponse<'s>

impl<'s> UnwindSafe for UntaggedResponse<'s>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]