File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,25 @@ impl<T: Read + Write + Unpin + fmt::Debug + Send> Session<T> {
400
400
Ok ( mbox)
401
401
}
402
402
403
+ /// Selects a mailbox with `(CONDSTORE)` parameter as defined in [RFC
404
+ /// 7162](https://www.rfc-editor.org/rfc/rfc7162.html#section-3.1.8).
405
+ pub async fn select_condstore < S : AsRef < str > > ( & mut self , mailbox_name : S ) -> Result < Mailbox > {
406
+ let id = self
407
+ . run_command ( & format ! (
408
+ "SELECT {} (CONDSTORE)" ,
409
+ validate_str( mailbox_name. as_ref( ) ) ?
410
+ ) )
411
+ . await ?;
412
+ let mbox = parse_mailbox (
413
+ & mut self . conn . stream ,
414
+ self . unsolicited_responses_tx . clone ( ) ,
415
+ id,
416
+ )
417
+ . await ?;
418
+
419
+ Ok ( mbox)
420
+ }
421
+
403
422
/// The `EXAMINE` command is identical to [`Session::select`] and returns the same output;
404
423
/// however, the selected mailbox is identified as read-only. No changes to the permanent state
405
424
/// of the mailbox, including per-user state, will happen in a mailbox opened with `examine`;
You can’t perform that action at this time.
0 commit comments