File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1700,6 +1700,7 @@ mod tests {
1700
1700
permanent_flags : vec ! [ ] ,
1701
1701
uid_next : Some ( 2 ) ,
1702
1702
uid_validity : Some ( 1257842737 ) ,
1703
+ highest_modseq : None ,
1703
1704
} ;
1704
1705
let mailbox_name = "INBOX" ;
1705
1706
let command = format ! ( "A0001 EXAMINE {}\r \n " , quote!( mailbox_name) ) ;
@@ -1723,6 +1724,7 @@ mod tests {
1723
1724
* OK [UNSEEN 1] First unseen.\r \n \
1724
1725
* OK [UIDVALIDITY 1257842737] UIDs valid\r \n \
1725
1726
* OK [UIDNEXT 2] Predicted next UID\r \n \
1727
+ * OK [HIGHESTMODSEQ 90060115205545359] Highest mailbox modsequence\r \n \
1726
1728
A0001 OK [READ-ONLY] Select completed.\r \n "
1727
1729
. to_vec ( ) ;
1728
1730
let expected_mailbox = Mailbox {
@@ -1746,6 +1748,7 @@ mod tests {
1746
1748
] ,
1747
1749
uid_next : Some ( 2 ) ,
1748
1750
uid_validity : Some ( 1257842737 ) ,
1751
+ highest_modseq : Some ( 90060115205545359 ) ,
1749
1752
} ;
1750
1753
let mailbox_name = "INBOX" ;
1751
1754
let command = format ! ( "A0001 SELECT {}\r \n " , quote!( mailbox_name) ) ;
Original file line number Diff line number Diff line change @@ -220,6 +220,9 @@ pub(crate) async fn parse_mailbox<T: Stream<Item = io::Result<ResponseData>> + U
220
220
Some ( ResponseCode :: UidNext ( unext) ) => {
221
221
mailbox. uid_next = Some ( * unext) ;
222
222
}
223
+ Some ( ResponseCode :: HighestModSeq ( highest_modseq) ) => {
224
+ mailbox. highest_modseq = Some ( * highest_modseq) ;
225
+ }
223
226
Some ( ResponseCode :: Unseen ( n) ) => {
224
227
mailbox. unseen = Some ( * n) ;
225
228
}
Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ pub struct Mailbox {
35
35
/// The unique identifier validity value. See [`Uid`] for more details. If this is missing,
36
36
/// the server does not support unique identifiers.
37
37
pub uid_validity : Option < u32 > ,
38
+
39
+ /// Highest mailbox mod-sequence as defined in [RFC-7162](https://tools.ietf.org/html/rfc7162).
40
+ pub highest_modseq : Option < u64 > ,
38
41
}
39
42
40
43
impl fmt:: Display for Mailbox {
You can’t perform that action at this time.
0 commit comments