diff options
author | Simon Heath <icefoxen@gmail.com> | 2017-12-11 12:45:07 -0500 |
---|---|---|
committer | Simon Heath <icefoxen@gmail.com> | 2017-12-11 12:45:07 -0500 |
commit | fc77980617d9ef179ecb1773f3d901f52790cfad (patch) | |
tree | 09575ccc3c80827881305e3e315e260aee57d53c /ipfs-api/src/response | |
parent | fac1b03d287a61f6679856e954aa59c5cbf1dbca (diff) |
Add basic derive's to all types
...though I may have missed some. But everything that can
should now impl Debug, Copy, Clone, PartialEq, Eq, and Hash.
Diffstat (limited to 'ipfs-api/src/response')
27 files changed, 67 insertions, 70 deletions
diff --git a/ipfs-api/src/response/add.rs b/ipfs-api/src/response/add.rs index 24c82ac..e606f6e 100644 --- a/ipfs-api/src/response/add.rs +++ b/ipfs-api/src/response/add.rs @@ -6,7 +6,7 @@ // copied, modified, or distributed except according to those terms. // -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct AddResponse { pub name: String, diff --git a/ipfs-api/src/response/block.rs b/ipfs-api/src/response/block.rs index 34855e2..5177300 100644 --- a/ipfs-api/src/response/block.rs +++ b/ipfs-api/src/response/block.rs @@ -6,7 +6,7 @@ // copied, modified, or distributed except according to those terms. // -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct BlockPutResponse { pub key: String, @@ -14,7 +14,7 @@ pub struct BlockPutResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct BlockRmResponse { pub hash: String, @@ -22,7 +22,7 @@ pub struct BlockRmResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct BlockStatResponse { pub key: String, diff --git a/ipfs-api/src/response/commands.rs b/ipfs-api/src/response/commands.rs index bbdeaaa..0cf8f6f 100644 --- a/ipfs-api/src/response/commands.rs +++ b/ipfs-api/src/response/commands.rs @@ -9,7 +9,7 @@ use response::serde; -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct CommandsResponseOptions { #[serde(deserialize_with = "serde::deserialize_vec")] @@ -17,7 +17,7 @@ pub struct CommandsResponseOptions { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct CommandsResponse { pub name: String, diff --git a/ipfs-api/src/response/dag.rs b/ipfs-api/src/response/dag.rs index 6d5e25b..ae9ae1e 100644 --- a/ipfs-api/src/response/dag.rs +++ b/ipfs-api/src/response/dag.rs @@ -10,7 +10,7 @@ use response::serde; use std::collections::HashMap; -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "PascalCase")] pub struct DagIpfsHeader { pub name: String, @@ -21,7 +21,7 @@ pub struct DagIpfsHeader { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq)] pub struct DagGetResponse { pub data: Option<String>, @@ -30,7 +30,7 @@ pub struct DagGetResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct DagPutResponse { pub cid: String, diff --git a/ipfs-api/src/response/dns.rs b/ipfs-api/src/response/dns.rs index 69f79d2..64b909a 100644 --- a/ipfs-api/src/response/dns.rs +++ b/ipfs-api/src/response/dns.rs @@ -6,7 +6,7 @@ // copied, modified, or distributed except according to those terms. // -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct DnsResponse { pub path: String, diff --git a/ipfs-api/src/response/error.rs b/ipfs-api/src/response/error.rs index 5f67eec..6222a08 100644 --- a/ipfs-api/src/response/error.rs +++ b/ipfs-api/src/response/error.rs @@ -12,7 +12,7 @@ use serde_urlencoded; use std::string::FromUtf8Error; -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct ApiError { pub message: String, diff --git a/ipfs-api/src/response/file.rs b/ipfs-api/src/response/file.rs index 7623135..d220dcf 100644 --- a/ipfs-api/src/response/file.rs +++ b/ipfs-api/src/response/file.rs @@ -10,7 +10,7 @@ use response::{serde, IpfsHeader}; use std::collections::HashMap; -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct IpfsDetailedFile { pub hash: String, @@ -24,7 +24,7 @@ pub struct IpfsDetailedFile { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "PascalCase")] pub struct FileLsResponse { #[serde(deserialize_with = "serde::deserialize_hashmap")] diff --git a/ipfs-api/src/response/files.rs b/ipfs-api/src/response/files.rs index 1b073de..fdcd873 100644 --- a/ipfs-api/src/response/files.rs +++ b/ipfs-api/src/response/files.rs @@ -15,7 +15,7 @@ pub type FilesCpResponse = (); pub type FilesFlushResponse = (); -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct FilesEntry { pub name: String, @@ -29,7 +29,7 @@ pub struct FilesEntry { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct FilesLsResponse { #[serde(deserialize_with = "serde::deserialize_vec")] @@ -46,7 +46,7 @@ pub type FilesMvResponse = (); pub type FilesRmResponse = (); -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct FilesStatResponse { pub hash: String, diff --git a/ipfs-api/src/response/filestore.rs b/ipfs-api/src/response/filestore.rs index f2f62e5..e766eb7 100644 --- a/ipfs-api/src/response/filestore.rs +++ b/ipfs-api/src/response/filestore.rs @@ -6,7 +6,7 @@ // copied, modified, or distributed except according to those terms. // -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct FilestoreDupsResponse { #[serde(rename = "Ref")] @@ -16,7 +16,7 @@ pub struct FilestoreDupsResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct FilestoreObject { pub status: i32, diff --git a/ipfs-api/src/response/id.rs b/ipfs-api/src/response/id.rs index 72a0569..678a8a4 100644 --- a/ipfs-api/src/response/id.rs +++ b/ipfs-api/src/response/id.rs @@ -9,7 +9,7 @@ use response::serde; -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct IdResponse { #[serde(rename = "ID")] diff --git a/ipfs-api/src/response/key.rs b/ipfs-api/src/response/key.rs index 2eb7de7..3bbe7c6 100644 --- a/ipfs-api/src/response/key.rs +++ b/ipfs-api/src/response/key.rs @@ -9,7 +9,7 @@ use response::serde; -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct KeyGenResponse { pub name: String, @@ -17,7 +17,7 @@ pub struct KeyGenResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct KeyListResponse { #[serde(deserialize_with = "serde::deserialize_vec")] diff --git a/ipfs-api/src/response/log.rs b/ipfs-api/src/response/log.rs index 643d341..786cbdf 100644 --- a/ipfs-api/src/response/log.rs +++ b/ipfs-api/src/response/log.rs @@ -9,14 +9,14 @@ use response::serde; -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct LogLevelResponse { pub message: String, } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct LogLsResponse { #[serde(deserialize_with = "serde::deserialize_vec")] diff --git a/ipfs-api/src/response/ls.rs b/ipfs-api/src/response/ls.rs index fa9a26b..b8a7c5a 100644 --- a/ipfs-api/src/response/ls.rs +++ b/ipfs-api/src/response/ls.rs @@ -9,7 +9,7 @@ use response::serde; -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct IpfsFile { pub hash: String, @@ -19,7 +19,7 @@ pub struct IpfsFile { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct IpfsFileHeader { pub name: String, @@ -31,7 +31,7 @@ pub struct IpfsFileHeader { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct LsResponse { #[serde(deserialize_with = "serde::deserialize_vec")] diff --git a/ipfs-api/src/response/mod.rs b/ipfs-api/src/response/mod.rs index e42c067..5fe9413 100644 --- a/ipfs-api/src/response/mod.rs +++ b/ipfs-api/src/response/mod.rs @@ -92,8 +92,7 @@ mod swarm; mod tar; mod version; - -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct IpfsHeader { pub name: String, diff --git a/ipfs-api/src/response/mount.rs b/ipfs-api/src/response/mount.rs index 1479aa3..c5c9bf9 100644 --- a/ipfs-api/src/response/mount.rs +++ b/ipfs-api/src/response/mount.rs @@ -6,7 +6,7 @@ // copied, modified, or distributed except according to those terms. // -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct MountResponse { #[serde(rename = "IPFS")] diff --git a/ipfs-api/src/response/name.rs b/ipfs-api/src/response/name.rs index 00d8cda..7ca952a 100644 --- a/ipfs-api/src/response/name.rs +++ b/ipfs-api/src/response/name.rs @@ -6,7 +6,7 @@ // copied, modified, or distributed except according to those terms. // -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct NamePublishResponse { pub name: String, @@ -14,7 +14,7 @@ pub struct NamePublishResponse { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct NameResolveResponse { pub path: String, diff --git a/ipfs-api/src/response/object.rs b/ipfs-api/src/response/object.rs index de5923c..b002d4b 100644 --- a/ipfs-api/src/response/object.rs +++ b/ipfs-api/src/response/object.rs @@ -13,7 +13,7 @@ use std::collections::HashMap; pub type ObjectDataResponse = Vec<u8>; -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "PascalCase")] pub struct ObjectDiff { #[serde(rename = "Type")] @@ -29,7 +29,7 @@ pub struct ObjectDiff { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "PascalCase")] pub struct ObjectDiffResponse { #[serde(deserialize_with = "serde::deserialize_vec")] @@ -37,7 +37,7 @@ pub struct ObjectDiffResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct ObjectGetResponse { pub data: String, @@ -47,7 +47,7 @@ pub struct ObjectGetResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct ObjectLinksResponse { pub hash: String, @@ -57,7 +57,7 @@ pub struct ObjectLinksResponse { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct ObjectNewResponse { pub hash: String, @@ -67,7 +67,7 @@ pub struct ObjectNewResponse { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct ObjectPatchAddLinkResponse { pub hash: String, @@ -77,7 +77,7 @@ pub struct ObjectPatchAddLinkResponse { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct ObjectPatchAppendDataResponse { pub hash: String, @@ -87,7 +87,7 @@ pub struct ObjectPatchAppendDataResponse { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct ObjectPatchRmLinkResponse { pub hash: String, @@ -97,7 +97,7 @@ pub struct ObjectPatchRmLinkResponse { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct ObjectPatchSetDataResponse { pub hash: String, @@ -107,7 +107,7 @@ pub struct ObjectPatchSetDataResponse { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct ObjectPutResponse { pub hash: String, @@ -117,7 +117,7 @@ pub struct ObjectPutResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct ObjectStatResponse { pub hash: String, diff --git a/ipfs-api/src/response/pin.rs b/ipfs-api/src/response/pin.rs index 2b8b4ef..a072230 100644 --- a/ipfs-api/src/response/pin.rs +++ b/ipfs-api/src/response/pin.rs @@ -9,8 +9,7 @@ use response::serde; use std::collections::HashMap; - -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct PinAddResponse { #[serde(deserialize_with = "serde::deserialize_vec")] @@ -20,7 +19,7 @@ pub struct PinAddResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct PinType { #[serde(rename = "Type")] @@ -29,7 +28,7 @@ pub struct PinType { -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "PascalCase")] pub struct PinLsResponse { #[serde(deserialize_with = "serde::deserialize_hashmap")] @@ -37,7 +36,7 @@ pub struct PinLsResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct PinRmResponse { #[serde(deserialize_with = "serde::deserialize_vec")] diff --git a/ipfs-api/src/response/ping.rs b/ipfs-api/src/response/ping.rs index 165ed39..ff48a99 100644 --- a/ipfs-api/src/response/ping.rs +++ b/ipfs-api/src/response/ping.rs @@ -6,7 +6,7 @@ // copied, modified, or distributed except according to those terms. // -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct PingResponse { pub success: bool, diff --git a/ipfs-api/src/response/pubsub.rs b/ipfs-api/src/response/pubsub.rs index e35b30f..b4af8b4 100644 --- a/ipfs-api/src/response/pubsub.rs +++ b/ipfs-api/src/response/pubsub.rs @@ -9,7 +9,7 @@ use response::serde; -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct PubsubLsResponse { #[serde(deserialize_with = "serde::deserialize_vec")] @@ -17,18 +17,17 @@ pub struct PubsubLsResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct PubsubPeersResponse { #[serde(deserialize_with = "serde::deserialize_vec")] pub strings: Vec<String>, } - pub type PubsubPubResponse = (); -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] pub struct PubsubSubResponse { pub from: Option<String>, pub data: Option<String>, diff --git a/ipfs-api/src/response/refs.rs b/ipfs-api/src/response/refs.rs index 457a9f7..be69b3d 100644 --- a/ipfs-api/src/response/refs.rs +++ b/ipfs-api/src/response/refs.rs @@ -6,7 +6,7 @@ // copied, modified, or distributed except according to those terms. // -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct RefsLocalResponse { #[serde(rename = "Ref")] diff --git a/ipfs-api/src/response/repo.rs b/ipfs-api/src/response/repo.rs index fb82936..556a784 100644 --- a/ipfs-api/src/response/repo.rs +++ b/ipfs-api/src/response/repo.rs @@ -10,14 +10,14 @@ use response::serde; use std::collections::HashMap; -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct RepoFsckResponse { pub message: String, } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "PascalCase")] pub struct RepoGcResponse { #[serde(deserialize_with = "serde::deserialize_hashmap")] @@ -26,7 +26,7 @@ pub struct RepoGcResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct RepoStatResponse { pub num_objects: u64, @@ -37,7 +37,7 @@ pub struct RepoStatResponse { // Defined in go-ipfs:master core/commands/repo.go -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct RepoVerifyResponse { pub message: String, @@ -46,7 +46,7 @@ pub struct RepoVerifyResponse { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct RepoVersionResponse { pub version: String, diff --git a/ipfs-api/src/response/resolve.rs b/ipfs-api/src/response/resolve.rs index 6f78205..d61738b 100644 --- a/ipfs-api/src/response/resolve.rs +++ b/ipfs-api/src/response/resolve.rs @@ -6,7 +6,7 @@ // copied, modified, or distributed except according to those terms. // -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct ResolveResponse { pub path: String, diff --git a/ipfs-api/src/response/stats.rs b/ipfs-api/src/response/stats.rs index 931f6e5..894d7f2 100644 --- a/ipfs-api/src/response/stats.rs +++ b/ipfs-api/src/response/stats.rs @@ -12,7 +12,7 @@ use response::{BitswapStatResponse, RepoStatResponse}; pub type StatsBitswapResponse = BitswapStatResponse; -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Copy, Clone, PartialEq)] #[serde(rename_all = "PascalCase")] pub struct StatsBwResponse { pub total_in: u64, diff --git a/ipfs-api/src/response/swarm.rs b/ipfs-api/src/response/swarm.rs index 5bdc8da..83ea649 100644 --- a/ipfs-api/src/response/swarm.rs +++ b/ipfs-api/src/response/swarm.rs @@ -9,7 +9,7 @@ use response::serde; -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct SwarmAddrsLocalResponse { #[serde(deserialize_with = "serde::deserialize_vec")] @@ -17,7 +17,7 @@ pub struct SwarmAddrsLocalResponse { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct SwarmAddrsConnectResponse { #[serde(deserialize_with = "serde::deserialize_vec")] @@ -25,7 +25,7 @@ pub struct SwarmAddrsConnectResponse { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct SwarmAddrsDisconnectResponse { #[serde(deserialize_with = "serde::deserialize_vec")] @@ -33,7 +33,7 @@ pub struct SwarmAddrsDisconnectResponse { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct SwarmFiltersAddResponse { #[serde(deserialize_with = "serde::deserialize_vec")] @@ -41,7 +41,7 @@ pub struct SwarmFiltersAddResponse { } -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct SwarmFiltersRmResponse { #[serde(deserialize_with = "serde::deserialize_vec")] @@ -49,14 +49,14 @@ pub struct SwarmFiltersRmResponse { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct SwarmPeerStream { pub protocol: String, } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct SwarmPeer { pub addr: String, @@ -69,7 +69,7 @@ pub struct SwarmPeer { } -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct SwarmPeersResponse { #[serde(deserialize_with = "serde::deserialize_vec")] diff --git a/ipfs-api/src/response/tar.rs b/ipfs-api/src/response/tar.rs index bb78d37..23a2a96 100644 --- a/ipfs-api/src/response/tar.rs +++ b/ipfs-api/src/response/tar.rs @@ -6,7 +6,7 @@ // copied, modified, or distributed except according to those terms. // -#[derive(Debug, Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct TarAddResponse { pub name: String, diff --git a/ipfs-api/src/response/version.rs b/ipfs-api/src/response/version.rs index 9f6b5f2..8c2f7e8 100644 --- a/ipfs-api/src/response/version.rs +++ b/ipfs-api/src/response/version.rs @@ -6,7 +6,7 @@ // copied, modified, or distributed except according to those terms. // -#[derive(Debug, Deserialize)] +#[derive(Debug, Deserialize, Clone, PartialEq, Eq, Hash)] #[serde(rename_all = "PascalCase")] pub struct VersionResponse { pub version: String, |