swayipc_command_builder/commands/rename.rs
1use super::*;
2
3impl Command<Rename> {
4 pub fn current_workspace(self) -> Command<Rename<To>> {
5 self.push_str("workspace").transmute()
6 }
7
8 pub fn workspace(self, name: impl AsRef<str>) -> Command<Rename<To>> {
9 self.push_str("workspace").push_str(name).transmute()
10 }
11}
12
13impl Command<Rename<To>> {
14 pub fn to(self, name: impl AsRef<str>) -> Command<Valid> {
15 self.push_str("to").push_str(name).transmute()
16 }
17}