pub enum Command {
Shutdown,
Library(LibraryCommand),
EventStream,
Disconnect,
Playback(PlaybackCommand),
Ping,
}Expand description
Command that can be executed by a daemon instance.
The expected response may be different depending on the command sent. If it isn’t specified in
the variant documentation, assume Response::Ok is the expected response.
Variants§
Shutdown
Stop the daemon instance.
After sending this command, the daemon will close almost immediately, so all connections
to it should be considered closed.
Library(LibraryCommand)
Subcommand for managing the music library.
EventStream
Stream events from the daemon.
The daemon will stop accepting requests from the connection this command was executed on.
Disconnect
Close the connection to the daemon.
Playback(PlaybackCommand)
Command to the playback module.
Ping
Ping the daemon.
The daemon will respond to this with Response::Pong if successful.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more