// Copyright 2017 rust-ipfs-api Developers // // Licensed under the Apache License, Version 2.0, or the MIT license , at your option. This file may not be // copied, modified, or distributed except according to those terms. // use response::{serde, IpfsHeader}; use std::collections::HashMap; #[derive(Debug, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct IpfsDetailedFile { pub hash: String, pub size: u64, #[serde(rename = "Type")] pub typ: String, #[serde(default)] pub links: Vec, } #[derive(Debug, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct FileLsResponse { #[serde(deserialize_with = "serde::deserialize_hashmap")] pub arguments: HashMap, #[serde(deserialize_with = "serde::deserialize_hashmap")] pub objects: HashMap, } #[cfg(test)] mod tests { deserialize_test!(v0_file_ls_0, FileLsResponse); deserialize_test!(v0_file_ls_1, FileLsResponse); }