1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use crate::{
    codec::{Codec, WithOffset, WithSize},
    spec::v1_2::data,
};

#[derive(Clone, Copy, Debug, PartialEq)]
pub struct FilePropertiesAction {
    /// Group with next action
    pub group: bool,
    /// Ask for a response (a status)
    pub resp: bool,
    pub file_id: u8,
    pub header: data::FileHeader,
}
super::impl_header_op!(FilePropertiesAction, group, resp, file_id, header);
impl std::fmt::Display for FilePropertiesAction {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        write!(
            f,
            "[{}{}]f({}){}",
            if self.group { "G" } else { "-" },
            if self.resp { "R" } else { "-" },
            self.file_id,
            self.header,
        )
    }
}