summaryrefslogtreecommitdiffstats
path: root/ipfs-api/src/response/dht.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ipfs-api/src/response/dht.rs')
-rw-r--r--ipfs-api/src/response/dht.rs15
1 files changed, 10 insertions, 5 deletions
diff --git a/ipfs-api/src/response/dht.rs b/ipfs-api/src/response/dht.rs
index 44de85d..483880d 100644
--- a/ipfs-api/src/response/dht.rs
+++ b/ipfs-api/src/response/dht.rs
@@ -47,19 +47,24 @@ impl<'de> Deserialize<'de> for DhtType {
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DhtPeerResponse {
- #[serde(rename = "ID")] pub id: String,
+ #[serde(rename = "ID")]
+ pub id: String,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub addrs: Vec<String>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub addrs: Vec<String>,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DhtMessage {
- #[serde(rename = "ID")] pub id: String,
+ #[serde(rename = "ID")]
+ pub id: String,
- #[serde(rename = "Type")] pub typ: DhtType,
+ #[serde(rename = "Type")]
+ pub typ: DhtType,
- #[serde(deserialize_with = "serde::deserialize_vec")] pub responses: Vec<DhtPeerResponse>,
+ #[serde(deserialize_with = "serde::deserialize_vec")]
+ pub responses: Vec<DhtPeerResponse>,
pub extra: String,
}