blob: 2da70e398800c99f0c4bc15894bed44f4bc872f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
use serde::{Deserialize, Serialize};
use std::fmt::Debug;
/// Data structure sent to the cache component
/// by the gateway & webhook.
#[derive(Serialize, Deserialize, Debug)]
#[serde(bound(deserialize = "T: Deserialize<'de> + Debug"))]
pub struct CachePayload<T> {
#[serde(rename = "tr")]
pub tracing: Tracing,
#[serde(rename = "d")]
pub data: T,
#[serde(rename = "o")]
pub operation: String,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct Tracing {
pub node_id: String,
pub span: Option<String>
}
|