add actions derive macro

This commit is contained in:
timeshifter
2023-01-13 15:25:46 +01:00
parent 7792b98cb4
commit ce960a4e29
5 changed files with 229 additions and 138 deletions
+16 -11
View File
@@ -1,11 +1,16 @@
pub(crate) const CLEAN: &str = "clean";
pub(crate) const EDIT: &str = "edit";
pub(crate) const GROUPS: &str = "groups";
pub(crate) const IMPORT: &str = "import";
pub(crate) const NEW: &str = "new";
pub(crate) const REMOVE: &str = "remove";
pub(crate) const SEARCH: &str = "search";
pub(crate) const SHOW: &str = "show";
pub(crate) const SYNC: &str = "sync";
pub(crate) const UNMANAGED: &str = "unmanaged";
pub(crate) const VERSION: &str = "version";
use pacdef_macro::Action;
#[derive(Debug, Action)]
pub(crate) enum Actions {
Clean,
Edit,
Groups,
Import,
New,
Remove,
Search,
Show,
Sync,
Unmanaged,
Version,
}