diff options
Diffstat (limited to 'ipfs-api/src/response/files.rs')
-rw-r--r-- | ipfs-api/src/response/files.rs | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/ipfs-api/src/response/files.rs b/ipfs-api/src/response/files.rs index ae0c7d8..087c0ba 100644 --- a/ipfs-api/src/response/files.rs +++ b/ipfs-api/src/response/files.rs @@ -8,13 +8,10 @@ use response::serde; - pub type FilesCpResponse = (); - pub type FilesFlushResponse = (); - #[derive(Debug, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct FilesEntry { @@ -23,30 +20,23 @@ pub struct FilesEntry { // This is a protocol buffer enum type defined in // https://github.com/ipfs/go-ipfs/blob/master/unixfs/pb/unixfs.proto ... // So it might be some other type than u64, but certainly shouldn't be *bigger* than u64. - #[serde(rename = "Type")] - pub typ: u64, + #[serde(rename = "Type")] pub typ: u64, pub size: u64, pub hash: String, } - #[derive(Debug, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct FilesLsResponse { - #[serde(deserialize_with = "serde::deserialize_vec")] - pub entries: Vec<FilesEntry>, + #[serde(deserialize_with = "serde::deserialize_vec")] pub entries: Vec<FilesEntry>, } - pub type FilesMkdirResponse = (); - pub type FilesMvResponse = (); - pub type FilesRmResponse = (); - #[derive(Debug, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct FilesStatResponse { @@ -55,14 +45,11 @@ pub struct FilesStatResponse { pub cumulative_size: u64, pub blocks: u64, - #[serde(rename = "Type")] - pub typ: String, + #[serde(rename = "Type")] pub typ: String, } - pub type FilesWriteResponse = (); - #[cfg(test)] mod tests { deserialize_test!(v0_files_ls_0, FilesLsResponse); |