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::list, search, etc return type #69

Open
Polochon-street opened this issue Jan 8, 2024 · 0 comments
Open

Client::list, search, etc return type #69

Polochon-street opened this issue Jan 8, 2024 · 0 comments

Comments

@Polochon-street
Copy link

Polochon-street commented Jan 8, 2024

Hi!

First, thanks for your work on rust-mpd, it makes using MPD really nice with rust :)

I am wondering though, whether it would be possible to have an iterator over Songs, Strings, etc instead of a collected Vec for search functions, such as Client::list, Client:: search, etc (for instance, here https://docs.rs/mpd/latest/mpd/client/struct.Client.html#method.list)?

Some people have very big libraries, and collecting everything into a vector tends to get out of hand.
If not, how about making a list_iter, list_search and the likes? And / or making the run_command public (and maybe all the other helper functions, since socket is private), for people who would like to experiment?

I of course don't mind making a PR, depending on what you'd prefer :)

Cheers!

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

No branches or pull requests

1 participant