Enum melib::imap::UntaggedResponse

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

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

§reason: &'s str

Trait Implementations§

source§

impl<'s> Debug for UntaggedResponse<'s>

source§

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

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

impl<'s> PartialEq for UntaggedResponse<'s>

source§

fn eq(&self, other: &UntaggedResponse<'s>) -> 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<'s> Eq for UntaggedResponse<'s>

source§

impl<'s> StructuralPartialEq for UntaggedResponse<'s>

Auto Trait Implementations§

§

impl<'s> Freeze for UntaggedResponse<'s>

§

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§

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

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

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

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, 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.
source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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