commands: add derives for a few response types
This commit is contained in:
parent
4fada75fe9
commit
d45502a43e
@ -1,12 +1,14 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::commands::{
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
};
|
||||
|
||||
pub struct Outputs;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Output {
|
||||
pub id: u64,
|
||||
pub name: String,
|
||||
|
@ -1,3 +1,5 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::commands::{
|
||||
Command, GenericResponseValue, Request, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
@ -5,7 +7,7 @@ use crate::commands::{
|
||||
|
||||
pub struct Channels;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ChannelsResponse {
|
||||
pub channels: Vec<String>,
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::commands::{
|
||||
Command, GenericResponseValue, Request, RequestParserResult, ResponseAttributes,
|
||||
ResponseParserError,
|
||||
@ -5,7 +7,7 @@ use crate::commands::{
|
||||
|
||||
pub struct ReadMessages;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ReadMessagesResponse {
|
||||
pub messages: Vec<(String, String)>,
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
use std::{collections::HashMap, str::FromStr};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
commands::{
|
||||
get_property, Command, Request, RequestParserResult, ResponseAttributes,
|
||||
@ -10,6 +12,7 @@ use crate::{
|
||||
|
||||
pub struct ReplayGainStatus;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct ReplayGainStatusResponse {
|
||||
pub replay_gain_mode: ReplayGainModeMode,
|
||||
}
|
||||
|
@ -1,9 +1,12 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::commands::{
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
};
|
||||
|
||||
pub struct CurrentSong;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct CurrentSongResponse {}
|
||||
|
||||
impl Command for CurrentSong {
|
||||
|
Loading…
Reference in New Issue
Block a user