ipfs_api_prelude/request/
diag.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::request::ApiRequest;
10use serde::Serialize;
11
12pub struct DiagCmdsClear;
13
14impl_skip_serialize!(DiagCmdsClear);
15
16impl ApiRequest for DiagCmdsClear {
17    const PATH: &'static str = "/diag/cmds/clear";
18}
19
20#[derive(Serialize)]
21pub struct DiagCmdsSetTime<'a> {
22    #[serde(rename = "arg")]
23    pub time: &'a str,
24}
25
26impl<'a> ApiRequest for DiagCmdsSetTime<'a> {
27    const PATH: &'static str = "/diag/cmds/set-time";
28}
29
30pub struct DiagSys;
31
32impl_skip_serialize!(DiagSys);
33
34impl ApiRequest for DiagSys {
35    const PATH: &'static str = "/diag/sys";
36}