Make serialized POD ids available (#350)
This commit is contained in:
parent
757f8c0734
commit
5cdf53576b
1 changed files with 12 additions and 0 deletions
|
|
@ -27,6 +27,12 @@ pub struct SerializedSignedPod {
|
||||||
data: serde_json::Value,
|
data: serde_json::Value,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl SerializedSignedPod {
|
||||||
|
pub fn id(&self) -> PodId {
|
||||||
|
self.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, JsonSchema, Debug, Clone, PartialEq)]
|
#[derive(Serialize, Deserialize, JsonSchema, Debug, Clone, PartialEq)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
#[schemars(rename = "MainPod")]
|
#[schemars(rename = "MainPod")]
|
||||||
|
|
@ -39,6 +45,12 @@ pub struct SerializedMainPod {
|
||||||
data: serde_json::Value,
|
data: serde_json::Value,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl SerializedMainPod {
|
||||||
|
pub fn id(&self) -> PodId {
|
||||||
|
self.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl From<SignedPod> for SerializedSignedPod {
|
impl From<SignedPod> for SerializedSignedPod {
|
||||||
fn from(pod: SignedPod) -> Self {
|
fn from(pod: SignedPod) -> Self {
|
||||||
let (pod_type, pod_type_name_str) = pod.pod.pod_type();
|
let (pod_type, pod_type_name_str) = pod.pod.pod_type();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue