Trait Command

Source
pub trait Command {
    type Response;

    // Required methods
    fn command(&self) -> RawCommand;
    fn response(
        self,
        frame: Frame,
    ) -> Result<Self::Response, TypedResponseError>;
}
Expand description

Types which can be used as pre-built properly typed commands.

Required Associated Types§

Source

type Response

The response this command will return.

Required Methods§

Source

fn command(&self) -> RawCommand

Create the raw command representation for transmission.

Source

fn response(self, frame: Frame) -> Result<Self::Response, TypedResponseError>

Convert the raw response frame to the proper response type.

§Errors

This should return an error if the response was invalid.

Implementors§

Source§

impl Command for ClearQueue

Source§

impl Command for Count

Source§

impl Command for CountGrouped

Source§

impl Command for Crossfade

Source§

impl Command for CurrentSong

Source§

impl Command for Delete

Source§

impl Command for Find

Source§

impl Command for GetEnabledTagTypes

Source§

impl Command for GetPlaylists

Source§

impl Command for ListChannels

Source§

impl Command for Move

Source§

impl Command for Next

Source§

impl Command for Ping

Source§

impl Command for Play

Source§

impl Command for Previous

Source§

impl Command for Queue

Source§

impl Command for QueueRange

Source§

impl Command for ReadChannelMessages

Source§

impl Command for ReplayGainStatus

Source§

impl Command for Seek

Source§

impl Command for SeekTo

Source§

impl Command for SetBinaryLimit

Source§

impl Command for SetConsume

Source§

impl Command for SetPause

Source§

impl Command for SetRandom

Source§

impl Command for SetRepeat

Source§

impl Command for SetReplayGainMode

Source§

impl Command for SetSingle

Source§

impl Command for SetVolume

Source§

impl Command for Shuffle

Source§

impl Command for Stats

Source§

impl Command for Status

Source§

impl Command for Stop

Source§

impl<'a> Command for Add<'a>

Source§

impl<'a> Command for AddToPlaylist<'a>

Source§

impl<'a> Command for AlbumArt<'a>

Source§

impl<'a> Command for AlbumArtEmbedded<'a>

Source§

impl<'a> Command for ClearPlaylist<'a>

Source§

impl<'a> Command for DeletePlaylist<'a>

Source§

impl<'a> Command for GetPlaylist<'a>

Source§

impl<'a> Command for ListAllIn<'a>

Source§

impl<'a> Command for LoadPlaylist<'a>

Source§

impl<'a> Command for MoveInPlaylist<'a>

Source§

impl<'a> Command for RemoveFromPlaylist<'a>

Source§

impl<'a> Command for RenamePlaylist<'a>

Source§

impl<'a> Command for Rescan<'a>

Source§

impl<'a> Command for SaveQueueAsPlaylist<'a>

Source§

impl<'a> Command for SendChannelMessage<'a>

Source§

impl<'a> Command for StickerDelete<'a>

Source§

impl<'a> Command for StickerFind<'a>

Source§

impl<'a> Command for StickerGet<'a>

Source§

impl<'a> Command for StickerList<'a>

Source§

impl<'a> Command for StickerSet<'a>

Source§

impl<'a> Command for SubscribeToChannel<'a>

Source§

impl<'a> Command for TagTypes<'a>

Source§

impl<'a> Command for UnsubscribeFromChannel<'a>

Source§

impl<'a> Command for Update<'a>

Source§

impl<const N: usize> Command for List<N>