use crate::{
command::{self, Command},
device,
response::Response,
};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug)]
pub(crate) struct DeviceInfoCommand {}
impl Command for DeviceInfoCommand {
type ResponseType = DeviceInfoResponse;
}
#[derive(Serialize, Deserialize, Debug)]
pub struct DeviceInfoResponse(pub(crate) device::Info);
impl Response for DeviceInfoResponse {
const COMMAND_CODE: command::Code = command::Code::DeviceInfo;
}
impl From<DeviceInfoResponse> for device::Info {
fn from(response: DeviceInfoResponse) -> device::Info {
response.0
}
}