Trait MpdCmd

Source
pub trait MpdCmd {
    type Handler: ResponseHandler;

    const CMD: &'static str;

    // Provided methods
    fn argument(&self) -> Option<String> { ... }
    fn to_cmdline(&self) -> String { ... }
}

Required Associated Constants§

Source

const CMD: &'static str

The Command name

Required Associated Types§

Source

type Handler: ResponseHandler

The Response handler for this command

Provided Methods§

Source

fn argument(&self) -> Option<String>

Optionally returns the commands argument as a String

Source

fn to_cmdline(&self) -> String

Creates the MPD command line for this command

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl MpdCmd for Consume

Source§

const CMD: &'static str = "consume"

Source§

type Handler = OkResponse

Source§

impl MpdCmd for Idle

Source§

const CMD: &'static str = "idle"

Source§

type Handler = RespMapResponse<Subsystem>

Source§

impl MpdCmd for Next

Source§

const CMD: &'static str = "next"

Source§

type Handler = OkResponse

Source§

impl MpdCmd for NoIdle

Source§

const CMD: &'static str = "noidle"

Source§

type Handler = OkResponse

Source§

impl MpdCmd for PlayId

Source§

const CMD: &'static str = "playid"

Source§

type Handler = OkResponse

Source§

impl MpdCmd for PlayPause

Source§

const CMD: &'static str = "pause"

Source§

type Handler = OkResponse

Source§

impl MpdCmd for PlaylistInfo

Source§

const CMD: &'static str = "playlistinfo"

Source§

type Handler = Tracks

Source§

impl MpdCmd for Prev

Source§

const CMD: &'static str = "prev"

Source§

type Handler = OkResponse

Source§

impl MpdCmd for QueueClear

Source§

const CMD: &'static str = "clear"

Source§

type Handler = OkResponse

Source§

impl MpdCmd for Random

Source§

const CMD: &'static str = "random"

Source§

type Handler = OkResponse

Source§

impl MpdCmd for Repeat

Source§

const CMD: &'static str = "repeat"

Source§

type Handler = OkResponse

Source§

impl MpdCmd for Setvol

Source§

const CMD: &'static str = "setvol"

Source§

type Handler = OkResponse

Source§

impl MpdCmd for Stats

Source§

const CMD: &'static str = "stats"

Source§

type Handler = RespMapResponse<Stats>

Source§

impl MpdCmd for Status

Source§

const CMD: &'static str = "status"

Source§

type Handler = RespMapResponse<Status>

Source§

impl MpdCmd for Stop

Source§

const CMD: &'static str = "stop"

Source§

type Handler = OkResponse

Source§

impl<'a> MpdCmd for Listall<'a>

Source§

const CMD: &'static str = "listall"

Source§

type Handler = RespMapResponse<ListallResponse>

Source§

impl<'a> MpdCmd for ListallInfo<'a>

Source§

const CMD: &'static str = "listallinfo"

Source§

type Handler = MixedResponseResponse

Source§

impl<'a> MpdCmd for QueueAdd<'a>

Source§

const CMD: &'static str = "add"

Source§

type Handler = OkResponse

Source§

impl<'a> MpdCmd for Rescan<'a>

Source§

const CMD: &'static str = "rescan"

Source§

type Handler = RespMapResponse<DatabaseVersion>

Source§

impl<'a> MpdCmd for Search<'a>

Source§

const CMD: &'static str = "search"

Source§

type Handler = Tracks

Source§

impl<'a> MpdCmd for Update<'a>

Source§

const CMD: &'static str = "update"

Source§

type Handler = RespMapResponse<DatabaseVersion>