summaryrefslogtreecommitdiff
path: root/src-tauri/src/cmd.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-02-21 18:30:25 -0800
committerGitHub <[email protected]>2021-02-21 18:30:25 -0800
commit1a8d4449192b17c67f615faef44a1993efbac142 (patch)
tree3732be235698b60ba71622a95da719bc2480de0f /src-tauri/src/cmd.rs
downloadtauri-vue-master.tar.xz
tauri-vue-master.zip
Diffstat (limited to 'src-tauri/src/cmd.rs')
-rw-r--r--src-tauri/src/cmd.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src-tauri/src/cmd.rs b/src-tauri/src/cmd.rs
new file mode 100644
index 0000000..3c95a35
--- /dev/null
+++ b/src-tauri/src/cmd.rs
@@ -0,0 +1,10 @@
+use serde::Deserialize;
+
+#[derive(Deserialize)]
+#[serde(tag = "cmd", rename_all = "camelCase")]
+pub enum Cmd {
+ // your custom commands
+ // multiple arguments are allowed
+ // note that rename_all = "camelCase": you need to use "myCustomCommand" on JS
+ MyCustomCommand { argument: String },
+}