swayipc-command-builder 0.1.0

A library for building commands that can be executed by swayipc
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;

impl Command<Rename> {
    pub fn current_workspace(self) -> Command<Rename<To>> {
        self.push_str("workspace").transmute()
    }

    pub fn workspace(self, name: impl AsRef<str>) -> Command<Rename<To>> {
        self.push_str("workspace").push_str(name).transmute()
    }
}

impl Command<Rename<To>> {
    pub fn to(self, name: impl AsRef<str>) -> Command<Valid> {
        self.push_str("to").push_str(name).transmute()
    }
}