Commit graph

76 commits

Author SHA1 Message Date
Philipp Schuster
b22d389264
fix a bunch of typos (#289) 2024-07-14 10:59:17 +02:00
Jon Gjengset
b60ac6d3da Thanks clippy 2024-03-31 10:35:58 +02:00
Jon Gjengset
28faa816a9 Fix up doc links 2024-03-31 10:03:15 +02:00
Jon Gjengset
32d560afdf Remove unused imports 2024-03-31 09:51:17 +02:00
Jon Gjengset
57ea453c52
Merge pull request #245 from urkle/feat-boxed-stream
add in a client builder that abstracts away connecting to TLS or non-TLS connections and what TLS provider is used.
2023-10-07 16:56:10 +02:00
Edward Rudd
bb39460491 Change the client builder so that it abstracts away connecting to TLS or non-TLS connections and what TLS provider is used.
- this allows a more transparent and versatile usage of the library as one can simply compile it as-is and then use the builder to configure where we connect and how we connect without having to be concerned about what type is used for the imap::Client / imap::Session
2023-10-05 17:32:58 -04:00
Edward Rudd
245a6ca010 Change lifetime specifier for From<&str> for QuotaResourceName
- otherwise in common use-cases one cannot convert a String easily into a QuotaResourceName
2023-10-05 15:17:58 -04:00
Edward Rudd
3ca961a282
Add testing module that exposes parse methods (#262) 2023-08-25 18:47:03 +02:00
Conrad Hoffmann
64e7b4aa24 Un-export some exposed parse() functions 2023-01-16 16:38:19 +01:00
Edward Rudd
e082d2f4f4 fixup! add support for the imap quota extension (RFC 2087) 2022-10-25 15:26:36 -04:00
Edward Rudd
df7d6b271f fixup! add support for the imap quota extension (RFC 2087) 2022-10-18 21:39:06 -04:00
Edward Rudd
733aba99fe fixup! add support for the imap quota extension (RFC 2087) 2022-10-18 21:36:01 -04:00
Edward Rudd
b3529a058f fixup! adjust parse_until_done to return an Option so it is more versatile 2022-10-18 21:26:25 -04:00
Edward Rudd
9f7aedc8b0 fixup! add support for the imap quota extension (RFC 2087) 2022-09-26 18:52:05 -04:00
Edward Rudd
57ce6bb545 add support for the imap quota extension (RFC 2087) 2022-09-26 14:21:55 -04:00
Edward Rudd
9c08e14523 adjust parse_until_done to return an Option so it is more versatile 2022-09-26 14:21:55 -04:00
Edward Rudd
b12eda4924 implement ACL extension 2022-09-05 15:22:03 -04: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
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
Crispin Stichart
b22ce3a605 Add support for Gmail Labels 2022-04-12 11:33:02 -05:00
Jon Gjengset
b9b9328e18
Manual Default for Mailbox is intentional 2021-11-09 18:32:19 -08: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
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
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
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
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
5942553e7d Use iterators for Flag::from_strs() 2021-04-07 18:09:46 -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
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
Todd Mortimer
b8bd1e4cc7 Reorder UnsolicitedResponse alphabetically so it is easier to follow. 2021-04-05 15:39:38 -04:00
Todd Mortimer
529401a36d Implement a method to pass unilateral responses while IDLE.
While IDLE, the server sends unilateral responses to notify the client of
changes to the mailbox as they happen. Instead of always exiting the IDLE
on any change, allow the caller to pass a callback function which receives
the messages and returns an action to either Continue IDLE or Stop and exit.

For clients wishing to use the previous behaviour, a callback_stop convenience
function is provided that terminates the IDLE on any change to the mailbox.
2021-03-28 15:27:39 -04:00
Jon Gjengset
5b8e461eb6 Future-proof Flag for more variants 2021-03-06 15:30:23 -08:00
Jon Gjengset
18ca65dd3f Expose mailbox read-only flag 2021-03-06 15:02:48 -08:00
Jon Gjengset
9b78550394 Adopt latest imap_proto and expose error status codes 2021-03-06 14:53:14 -08:00
Jon Gjengset
a466e947bd
Merge branch 'master' into metadata-merge 2021-03-06 12:43:43 -05:00
Jon Gjengset
137f3de14f
Merge branch 'master' into mod_seq_vanished 2021-03-06 12:40:30 -05:00
Jon Gjengset
6935c51b2b
Merge branch 'master' into more-unilaterals 2021-03-06 12:37:52 -05:00
Todd Mortimer
a9788ad1e0 Add a Deleted type to wrap EXPUNGE and VANISHED responses.
EXPUNGE may return either a series of EXPUNGE responses each with
a single message sequence number, or a VANISHED response with a
sequence set of UIDs. This adds a wrapper enum and some associated
iterators to make it easy to handle these in the client.
2020-12-05 20:32:14 -05:00
Todd Mortimer
d381723deb Add non_exhaustive to Mailbox. 2020-11-14 16:52:03 -05:00