add support for the imap quota extension (RFC 2087)
Here is my first-stab at adding in support for the quota extension (already in imap-proto).
A few things I don't like with it right now.
- it exposes some of the imap-proto structs (QuotaResource)
- I can create local QuotaResource and map them.
- the "getquotaroot" is "fun" as it returns 2 resources, (1) QUOTAROOT and (n) QUOTAs.
- The issue here is that I have to run parse_many_into twice to get both resource sets. (unless I just don't use parse_many_into and just duplicate most of that in the method which I may do)
- this also causes a difference in response types.. e.g. set_quota and get_quota return a local Quota struct, but I the get_quota_root returns the imap-proto Quota struct (I did not see any easy way to convert ouroboros structs).
Anyways, it's starting point.. Please provide feedback. (this and #227) are two pieces of functionality I'll need for the application I'm building.
@jonhoo a bunch of changes and I applied all your feedback.. the result is much cleaner IMHO that the first draft.
And once #228 is merged in I'll add more integration tests..
@jonhoo once #227 is merged I'll rebase this and apply the same changes to this branch.
@urkle #227 is now merged :tada:
Codecov Report
Merging #235 (9d9a3ce) into main (3a65407) will increase coverage by
1.2%. The diff coverage is93.3%.
Additional details and impacted files
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/lib.rs | 100.0% <ø> (ø) |
|
| src/types/quota.rs | 87.6% <87.6%> (ø) |
|
| src/client.rs | 93.1% <94.9%> (+0.6%) |
:arrow_up: |
| src/parse.rs | 89.9% <95.1%> (+0.5%) |
:arrow_up: |
| src/utils.rs | 100.0% <100.0%> (ø) |
@jonhoo fixups pushed and your comments have been either fixed or replied to (For further discussion)
@jonhoo ooh.. you merged it with the fixup commits.. you probably should have either used the github squash merge or asked me to squash it down..
Oops, yes, completely forgot about those! My bad. Oh well, not the end of the world 😅