Skip to content

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

@Polochon-street

Description

@Polochon-street

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions