1use serde::{Deserialize, Serialize};
3
4use rd_util::*;
5
6static CMD_ACK_DOC: &str = "\
7//
8// rd-agent command ack file
9//
10// When the commands in cmd.rs are accepted for processing, its cmd_seq is
11// copied to this file. This can be used to synchronize command issuing.
12//
13";
14
15#[derive(Clone, PartialEq, Serialize, Deserialize)]
16#[serde(default)]
17pub struct CmdAck {
18 pub cmd_seq: u64,
19}
20
21impl Default for CmdAck {
22 fn default() -> Self {
23 Self { cmd_seq: 0 }
24 }
25}
26
27impl JsonLoad for CmdAck {}
28
29impl JsonSave for CmdAck {
30 fn preamble() -> Option<String> {
31 Some(CMD_ACK_DOC.into())
32 }
33}