Closed mordak closed 3 years ago
This is great, thanks! Would it be helpful to get a release including this?
Would it be helpful to get a release including this?
A release including this would be helpful, yes! :-)
0.12.0 is out now.
0.12.0 is out now.
Thank you! Just opened the domino PR for rust-imap: https://github.com/jonhoo/rust-imap/pull/172
And then my IMAP <-> Maildir sync engine will actually build against public crates!
RFC7162 defines a
VANISHED
response to theEXPUNGE
command which must be used whenever a client has enabledQRESYNC
.VANISHED
may also appear in response toSELECT/EXAMINE
orUID FETCH
.https://tools.ietf.org/html/rfc7162#section-3.2.10
The
VANISHED
response sends a sequence set ofUID
s indicatingUID
s which have been deleted from the mailbox.I had to add parsers for
sequence-range
(eg15:30
) andsequence-set
(eg.1,10:20,25,28:31
), and I put them in core.rs since they are actually defined in RFC 3501 and show up in a couple of other places, so may be generically useful.I am not sure if the choice to return a
Vec<RangeInclusive>
is to your liking. Alternatives could be just a tuple of(start, end)
, or expand the range out into a big list ofVec<u32>
. I experimented with both options and settled on theVec<RangeInclusive>
because:(start, end)
is inclusiveThe downside is it can be a bit awkward to use, since you end up iterating a list of iterators. Of course, the nicest way to represent this for the user is to expand the sequence set out into a
Vec<u32>
, but this could be wasteful / dangerous in some circumstances.