swayipc_command_builder/commands/
swap.rs1use super::*;
2
3impl Command<Swap> {
4 pub fn with(self) -> Command<Swap<With>> {
5 self.push_str("container").push_str("with").transmute()
6 }
7}
8
9impl Command<Swap<With>> {
10 pub fn id(self, id: usize) -> Command<Valid> {
11 self.push_str("id").push_str(id.to_string()).transmute()
12 }
13
14 pub fn con_id(self, con_id: usize) -> Command<Valid> {
15 self.push_str("con_id")
16 .push_str(con_id.to_string())
17 .transmute()
18 }
19
20 pub fn mark(self, mark: impl AsRef<str>) -> Command<Valid> {
21 self.push_str("mark").push_str(mark).transmute()
22 }
23}