Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client (high-level API) #174

Closed
wants to merge 3 commits into from
Closed

Client (high-level API) #174

wants to merge 3 commits into from

Conversation

soywod
Copy link
Contributor

@soywod soywod commented May 7, 2024

Hm, maybe I didn't understand your use-case correctly. Do you want to process tasks sequentially or in parallel?

Despite the fact that imap-flow abstractions are really good (they give a lot of flexibility), I believe most of the casual users (including myself with email-lib) do not care about this Sans IO abstraction. They just need a simple API where they can execute simple tasks, in serie. A bit like does the imap crate.

So far there is:

What I try to propose here is the high-level Client, composed of a Stream and Scheduler. Users could just connect to a server (TCP), ugrade to TLS and then execute actions like list_capabilities or fetch.

I would love feedback on the idea.

@coveralls
Copy link
Collaborator

coveralls commented May 7, 2024

Pull Request Test Coverage Report for Build 9259052264

Details

  • 1 of 4 (25.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+6.4%) to 64.477%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/stream.rs 0 3 0.0%
Totals Coverage Status
Change from base Build 9146846502: 6.4%
Covered Lines: 893
Relevant Lines: 1385

💛 - Coveralls

@soywod soywod changed the title Session (high-level API) Client (high-level API) May 8, 2024
@duesee
Copy link
Owner

duesee commented May 18, 2024

Merged all tasks so far! Now here comes the grand finale? :-)

@soywod
Copy link
Contributor Author

soywod commented May 18, 2024 via email

soywod added 2 commits May 19, 2024 21:13
feat: init Scheduler::run_task fn

feat: ensure that Scheduler is Send

fix: removed task utilities from Scheduler

fix: adjust code after review

feat: move run task to a dedicated Resolver

init client workspace

merge main + authenticate branches

adjust code with new resolver api

fix tasks re-export

make fetch output hashmap keys return seq or uid
@soywod soywod marked this pull request as ready for review May 20, 2024 08:53
@soywod
Copy link
Contributor Author

soywod commented May 20, 2024

I think it is reviewable (just misses #193), but I don't know how to proceed. The file client/src/lib.rs is giant. A big part is opinionated. I mostly "designed" the client according to what email-lib needs, but it definitely needs a review. Are you willing to maintain such client inside imap-flow?

@jakoschiko jakoschiko requested review from duesee and jakoschiko May 22, 2024 18:12
soywod added a commit to pimalaya/imap-client that referenced this pull request May 27, 2024
soywod added a commit to pimalaya/imap-client that referenced this pull request May 27, 2024
soywod added a commit to pimalaya/imap-client that referenced this pull request May 27, 2024
soywod added a commit to pimalaya/imap-client that referenced this pull request May 27, 2024
@soywod
Copy link
Contributor Author

soywod commented May 27, 2024

Closing in favour of https://github.com/soywod/imap-client. Code will adjust depending on your decisions (mostly talking about tasks).

@soywod soywod closed this May 27, 2024
@duesee
Copy link
Owner

duesee commented May 27, 2024

That was fast 🚀

soywod added a commit to pimalaya/imap-client that referenced this pull request May 29, 2024
soywod added a commit to pimalaya/imap-client that referenced this pull request May 29, 2024
soywod added a commit to pimalaya/imap-client that referenced this pull request May 29, 2024
soywod added a commit to pimalaya/imap-client that referenced this pull request May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants