Started work on fullfillment of requests
This commit is contained in:
@@ -3,6 +3,7 @@ pub mod query;
|
||||
pub mod execute;
|
||||
|
||||
use serde::Serialize;
|
||||
use serde_with::skip_serializing_none;
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
@@ -13,7 +14,7 @@ pub struct Response {
|
||||
}
|
||||
|
||||
impl Response {
|
||||
fn new(request_id: Uuid, payload: ResponsePayload) -> Self {
|
||||
pub fn new(request_id: Uuid, payload: ResponsePayload) -> Self {
|
||||
Self { request_id, payload }
|
||||
}
|
||||
}
|
||||
@@ -26,10 +27,10 @@ pub enum ResponsePayload {
|
||||
Execute(execute::Payload),
|
||||
}
|
||||
|
||||
#[skip_serializing_none]
|
||||
#[derive(Debug, Default, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct State {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
on: Option<bool>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user