// 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; use std::collections::HashMap; #[derive(Debug, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct DagIpfsHeader { pub name: String, pub size: u64, #[serde(deserialize_with = "serde::deserialize_hashmap")] pub cid: HashMap, } #[derive(Debug, Deserialize)] pub struct DagGetResponse { pub data: Option, #[serde(deserialize_with = "serde::deserialize_vec")] pub links: Vec, } #[derive(Debug, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct DagPutResponse { pub cid: String, } #[cfg(test)] mod tests { deserialize_test!(v0_dag_get_0, DagGetResponse); }