use crate::codec::{Codec, StdError, WithOffset, WithSize};
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct CopyFile {
pub group: bool,
pub resp: bool,
pub src_file_id: u8,
pub dst_file_id: u8,
}
impl std::fmt::Display for CopyFile {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(
f,
"[{}{}]f({})f({})",
if self.group { "G" } else { "-" },
if self.resp { "R" } else { "-" },
self.src_file_id,
self.dst_file_id,
)
}
}
super::impl_simple_op!(CopyFile, group, resp, src_file_id, dst_file_id);