Commit graph

295 commits

Author SHA1 Message Date
Edward Rudd
b12eda4924 implement ACL extension 2022-09-05 15:22:03 -04:00
Edward Rudd
21ea164e3e Use impl AsRef<str> instead of generics 2022-09-05 15:22:02 -04:00
Jon Gjengset
8d031f2003
Merge pull request #226 from bitfehler/master
doc: reference ::mv, not ::copy, from ::uid_mv
2022-08-11 18:18:46 -04:00
Jon Gjengset
8c2250297a
Merge pull request #232 from bitfehler/bitfehler/append-uid
Add support for APPENDUID response data
2022-08-10 22:21:56 -04:00
Jon Gjengset
26d89aebe1 Read greeting if TLS but no STARTTLS 2022-08-10 18:43:38 -07:00
Conrad Hoffmann
1732482a4f Add test for MULTIAPPEND UIDPLUS response 2022-08-02 10:47:23 +02:00
Conrad Hoffmann
213887bf27 Add test for parse_append() 2022-08-02 10:34:04 +02:00
Conrad Hoffmann
733340238c Remove implementation of fmt::Display for Appended 2022-08-02 10:32:55 +02:00
Conrad Hoffmann
75e5d7cf79 Add support for APPENDUID response data
If the `UIDPLUS` extension is supported, the server will reply to
`APPEND` commands with the UID of the new message. This can even be a
list of UIDs if the `MULTIAPPEND` extension is also supported.

Make this information available to the user as the result of an
`AppendCmd`. The added doc strings have links to the relevant RFCs.

Related to #131.
2022-08-02 10:32:55 +02:00
Jon Gjengset
f3a03ed693
Merge pull request #234 from bitfehler/bitfehler/expunge-mod-seq
Expose HIGHESTMODSEQ value in EXPUNGE response
2022-07-16 07:36:01 -07:00
Conrad Hoffmann
4ea652e3f7 Expose MODSEQ attribute in FETCH responses
If the QRESYNC (RFC 7162) extension is being used, a FETCH response to a
STORE or UID STORE command with the UNCHANGEDSINCE query attribute will
return the mod sequence ID of the performed operation. This information
is crucial for building efficient caching clients.
2022-07-14 15:05:29 +02:00
Conrad Hoffmann
b068208877 Add test case for EXPUNGE response w/ mod sequence 2022-07-14 14:55:46 +02:00
Conrad Hoffmann
564063561d Mark struct types::Deleted non-exhaustive 2022-07-14 14:55:24 +02:00
Conrad Hoffmann
81ed9ff1cf Expose HIGHESTMODSEQ value in EXPUNGE response
If the `QRESYNC` extension (RFC 7162) is being used, `EXPUNGE` responses
will return the new highest mod sequence for the mailbox after the
expunge operation. Access to this value is quite valuable for caching
clients.
2022-07-14 12:05:37 +02:00
Conrad Hoffmann
098a4022ca doc: reference ::mv, not ::copy, from ::uid_mv 2022-04-21 23:06:17 +02:00
Crispin Stichart
b22ce3a605 Add support for Gmail Labels 2022-04-12 11:33:02 -05:00
Lu Fennell
8147f17296 Improve error message for ValidationError
In addition to the invalid character, the error now also contains a
`command_synopsis` and `argument` which identifies the command and
argument that failed to validate.
2021-11-10 10:12:03 +01:00
Jon Gjengset
b9b9328e18
Manual Default for Mailbox is intentional 2021-11-09 18:32:19 -08:00
Jon Gjengset
88417339f9
Merge pull request #208 from mordak/zero-copy
Convert ZeroCopy to ouroboros.
2021-08-15 20:41:09 -04:00
Todd Mortimer
57834a1466 Use get() in tests 2021-07-31 20:04:22 -04:00
Todd Mortimer
efd0eadafe Implement get() for Fetch and Name 2021-07-31 19:26:48 -04:00
Todd Mortimer
54bca3eddb Add into_owned() for Fetch, Flag, and Name. 2021-07-31 18:22:59 -04:00
Todd Mortimer
fadb28a32b Revert accidental static lifetime to non-static. 2021-07-25 22:13:53 -04:00
Todd Mortimer
7e581a6b5e Use std::iter::once instead of Some. 2021-07-25 22:13:16 -04:00
Todd Mortimer
d6429512e8 Handle BYE responses explicitly.
In Session::logout(), ignore it. Fixes #210.
2021-07-25 21:21:07 -04:00
Todd Mortimer
826e6d413b Fix tests and examples. 2021-07-17 16:51:35 -04:00
Todd Mortimer
3f2331423c Rework Name and Fetch to use ouroboros.
Use a helper function in `parse_many_into` to support parsing into
any container that implements Extend. Refactor Capabilities to use it.

Delete ZeroCopy and associated bits.

Move Flag into it's own module in types.
2021-07-17 16:32:26 -04:00
Todd Mortimer
c2d3aed978 Convert Capabilities to ouroboros. 2021-07-05 20:11:36 -04:00
♫ Christian Krause ♫
d86d1e228b
fixes doc typos (#204) 2021-06-03 01:00:11 -04:00
mordak
d8d69a363b
Idle builder (#202) 2021-05-26 21:55:42 -04:00
mordak
b7a2641725
Change "tls" feature to "native-tls" (#201)
Change "tls" feature to "native-tls" for clarity and obvious distinction with rustls-tls.
2021-05-24 21:46:49 -04:00
comex
55cd6465c7
Support parsing STATUS responses. (v2) (#192)
Fixes #185.
2021-05-16 18:12:16 -04:00
mordak
7204697dd9
Add ClientBuilder helper to make setting up TLS connections easy. (#197)
Also replaces connect() and connect_starttls() with ClientBuilder.
2021-05-10 22:39:46 -04:00
mordak
c443a3ab5d
Fix doc warnings. (#198) 2021-05-07 22:07:34 -04:00
mordak
1db492ed3b
Add test for dovecot unsolicited OK progress message. (#196) 2021-04-25 19:59:05 -04:00
Clément DOUIN
2898e19530
RFC 5256 - SORT command (#180) 2021-04-19 23:03:23 -04:00
Todd Mortimer
1cabb3bb56 Promote Unexpected error from ParseError to Error. 2021-04-19 20:39:59 -04:00
Todd Mortimer
08de3362b4 Move debug assertion. 2021-04-08 20:08:51 -04:00
Todd Mortimer
4232c773b5 wait to wait_while 2021-04-08 19:50:20 -04:00
Todd Mortimer
692dcdd27e Move buffer management into parse match arms. 2021-04-07 21:18:17 -04:00
Todd Mortimer
584c9542d8 Reorder variants alphabetically in try_from. 2021-04-07 20:17:00 -04:00
Todd Mortimer
f2d7919f60 Do not wrap AttributeValue. 2021-04-07 20:10:33 -04:00
Todd Mortimer
efa02f07ab Remove wrapper around ResponseCode. 2021-04-07 20:02:34 -04:00
Todd Mortimer
7eb2cfde74 Use bool instead of CallbackAction. 2021-04-07 19:45:04 -04:00
Todd Mortimer
5942553e7d Use iterators for Flag::from_strs() 2021-04-07 18:09:46 -04:00
Todd Mortimer
11adcfc97b Tweak to how we handle incomplete parse. 2021-04-06 22:41:41 -04:00
Todd Mortimer
9126d3c15b Improve documentation around unhandled responses.
UnsolicitedResponse is not exhaustive, and open an issue if you find one
that isn't handled.
2021-04-06 21:54:52 -04:00
Todd Mortimer
ff39ebf58d Merge branch 'idle-responses' of github.com:mordak/rust-imap into idle-responses 2021-04-05 16:12:47 -04:00
Todd Mortimer
064c2e08dc Use drain() instead of reallocating. 2021-04-05 16:10:32 -04:00
Todd Mortimer
e1db863691 Add helper function to transform a vec of flag strings into a vec of Flags.
Also use it where we were previously iterating manually.
2021-04-05 15:59:12 -04:00