The position of an item in a list with an optional total length.
Can be used for e.g. track number,
where Position { 3, 12 } represents track 3 of a CD with 12 tracks,
or disc numbers in a multi-disc set.
An empty struct that can be used as the response data for commands that only ever return OK
or an error message, e.g. consume or other boolean toggles.
Parse the playlist command, a list of key-value pairs, as a vector of filenames.
The playlist index of each item is not included because, if needed,
it can easily be added with .enumerate().
Parse an interator of string slices into T,
returning Ok(T) if the data could be deserialized and the MPD response ended with OK or
Error if the deserialization failed or MPD sent an error message.
Parse an iterator of string slices into a vector of T, splitting at any occurence of first_key.
One possible use for this is the playlistinfo command which returns all items in the current
playlist, where the file: key denotes the start of a new item.