qemu_command_builder/
set.rs

1use bon::Builder;
2
3use crate::to_command::ToCommand;
4
5/// Set parameter arg for item id of type group
6#[derive(Debug, Clone, Hash, Ord, PartialOrd, Eq, PartialEq, Default, Builder)]
7pub struct Set {
8    group: String,
9    value: String,
10}
11
12impl ToCommand for Set {
13    fn to_command(&self) -> Vec<String> {
14        let mut cmd = vec![];
15
16        cmd.push("-set".to_string());
17
18        let mut arg = vec![self.group.clone()];
19        arg.push(format!("={}", self.value));
20
21        cmd.append(&mut arg);
22
23        cmd
24    }
25}