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
Trait Implementations§
source§impl<'s> Debug for UntaggedResponse<'s>
impl<'s> Debug for UntaggedResponse<'s>
source§impl<'s> PartialEq for UntaggedResponse<'s>
impl<'s> PartialEq for UntaggedResponse<'s>
source§fn eq(&self, other: &UntaggedResponse<'s>) -> bool
fn eq(&self, other: &UntaggedResponse<'s>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'s> Eq for UntaggedResponse<'s>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.