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

More convenience functions #69

Open
1 task
gammelalf opened this issue Jun 18, 2024 · 0 comments
Open
1 task

More convenience functions #69

gammelalf opened this issue Jun 18, 2024 · 0 comments
Labels
discussion needed There is something to discuss before going on enhancement New feature or request

Comments

@gammelalf
Copy link
Member

gammelalf commented Jun 18, 2024

How many convenience functions should we add?

Pro: Is convenient
Con: Increases API surface which might be harder to navigate

Suggested functions:

  • query!().map_all(...) which queries all entries, returns them as Vec but maps them through a closure first

    Currently possible solutions:

    • query!().stream().map_ok(...).try_collect::<Vec<_>>() (requires TryStreamExt)
    • query!().all().into_iter().map(...).collect::<Vec<_>>() (requires unnecessary alloc)

    Alternatives:

    • Extend Selector and Decoder to be easier to implement / extend using combinators.
      (Already kind of planned, but will take a while)
@gammelalf gammelalf added enhancement New feature or request discussion needed There is something to discuss before going on labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion needed There is something to discuss before going on enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant