Skip to content

Commit 5cdf535

Browse files
authored
Make serialized POD ids available (#350)
1 parent 757f8c0 commit 5cdf535

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/frontend/serialization.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ pub struct SerializedSignedPod {
2727
data: serde_json::Value,
2828
}
2929

30+
impl SerializedSignedPod {
31+
pub fn id(&self) -> PodId {
32+
self.id
33+
}
34+
}
35+
3036
#[derive(Serialize, Deserialize, JsonSchema, Debug, Clone, PartialEq)]
3137
#[serde(rename_all = "camelCase")]
3238
#[schemars(rename = "MainPod")]
@@ -39,6 +45,12 @@ pub struct SerializedMainPod {
3945
data: serde_json::Value,
4046
}
4147

48+
impl SerializedMainPod {
49+
pub fn id(&self) -> PodId {
50+
self.id
51+
}
52+
}
53+
4254
impl From<SignedPod> for SerializedSignedPod {
4355
fn from(pod: SignedPod) -> Self {
4456
let (pod_type, pod_type_name_str) = pod.pod.pod_type();

0 commit comments

Comments
 (0)