Add Deserialize to Create and Update datapoints
This commit is contained in:
@@ -119,7 +119,7 @@ pub struct Datapoint {
|
|||||||
|
|
||||||
/// Parameters for creating or updating a datapoint
|
/// Parameters for creating or updating a datapoint
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct CreateDatapoint {
|
pub struct CreateDatapoint {
|
||||||
/// The value to record
|
/// The value to record
|
||||||
pub value: f64,
|
pub value: f64,
|
||||||
@@ -172,7 +172,7 @@ impl CreateDatapoint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Parameters for updating an existing datapoint
|
/// Parameters for updating an existing datapoint
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct UpdateDatapoint {
|
pub struct UpdateDatapoint {
|
||||||
/// ID of the datapoint to update
|
/// ID of the datapoint to update
|
||||||
#[serde(skip_serializing)]
|
#[serde(skip_serializing)]
|
||||||
|
|||||||
Reference in New Issue
Block a user