ipfs_api_prelude/response/
bootstrap.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::response::serde;
10use crate::serde::Deserialize;
11
12#[derive(Debug, Deserialize)]
13#[serde(rename_all = "PascalCase")]
14pub struct BootstrapAddDefaultResponse {
15    #[serde(deserialize_with = "serde::deserialize_vec")]
16    pub peers: Vec<String>,
17}
18
19#[derive(Debug, Deserialize)]
20#[serde(rename_all = "PascalCase")]
21pub struct BootstrapListResponse {
22    #[serde(deserialize_with = "serde::deserialize_vec")]
23    pub peers: Vec<String>,
24}
25
26#[derive(Debug, Deserialize)]
27#[serde(rename_all = "PascalCase")]
28pub struct BootstrapRmAllResponse {
29    #[serde(deserialize_with = "serde::deserialize_vec")]
30    pub peers: Vec<String>,
31}
32
33#[cfg(test)]
34mod tests {
35    deserialize_test!(v0_bootstrap_list_0, BootstrapListResponse);
36}