ipfs_api_prelude/response/
block.rs

1// Copyright 2017 rust-ipfs-api Developers
2//
3// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
4// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
5// http://opensource.org/licenses/MIT>, at your option. This file may not be
6// copied, modified, or distributed except according to those terms.
7//
8
9use crate::serde::Deserialize;
10
11#[derive(Debug, Deserialize)]
12#[serde(rename_all = "PascalCase")]
13pub struct BlockPutResponse {
14    pub key: String,
15    pub size: u64,
16}
17
18#[derive(Debug, Deserialize)]
19#[serde(rename_all = "PascalCase")]
20pub struct BlockRmResponse {
21    pub hash: String,
22    pub error: Option<String>,
23}
24
25#[derive(Debug, Deserialize)]
26#[serde(rename_all = "PascalCase")]
27pub struct BlockStatResponse {
28    pub key: String,
29    pub size: u64,
30}
31
32#[cfg(test)]
33mod tests {
34    deserialize_test!(v0_block_stat_0, BlockStatResponse);
35}