kstep/rust-mpd

Client::list, search, etc return type

Polochon-street opened this issue · 0 comments

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!