mpd_protocol 0.6.0

Implementation of MPD client protocol
Documentation
/// Conveniently generate a command list.
///
/// ```
/// use mpd_protocol::{command_list, Command, CommandList};
///
/// command_list![
///     Command::new("status"),
///     Command::new("pause").argument("1")
/// ];
///
/// // Equivalent to:
///
/// {
///     let mut command_list = CommandList::new(
///         Command::new("status")
///     );
///     command_list.add(
///         Command::new("pause").argument("1")
///     );
///     command_list
/// };
/// ```
#[macro_export]
macro_rules! command_list {
    ($first:expr) => {
        command_list!($first,)
    };
    ($first:expr, $( $tail:expr ),*) => {
        {
            #[allow(unused_mut)]
            let mut list = $crate::CommandList::new($first);

            $(
                list.add($tail);
            )*

            list
        }
    };
}