2021-05-05 20:32:13 +03:00
|
|
|
// Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2021-05-09 14:52:20 +03:00
|
|
|
use tauri::{command, State};
|
|
|
|
|
2021-05-12 17:17:33 +03:00
|
|
|
#[command]
|
|
|
|
pub fn cmd(_argument: String) {}
|
|
|
|
|
2021-05-12 18:22:05 +03:00
|
|
|
#[command]
|
|
|
|
pub fn invoke(_argument: String) {}
|
|
|
|
|
2021-05-12 18:56:16 +03:00
|
|
|
#[command]
|
|
|
|
pub fn message(_argument: String) {}
|
|
|
|
|
|
|
|
#[command]
|
|
|
|
pub fn resolver(_argument: String) {}
|
|
|
|
|
2021-05-09 14:52:20 +03:00
|
|
|
#[command]
|
2021-05-05 20:32:13 +03:00
|
|
|
pub fn simple_command(argument: String) {
|
|
|
|
println!("{}", argument);
|
|
|
|
}
|
|
|
|
|
2021-05-09 14:52:20 +03:00
|
|
|
#[command]
|
2021-10-22 16:04:42 +03:00
|
|
|
pub fn stateful_command(argument: Option<String>, state: State<'_, super::MyState>) {
|
2021-05-05 20:32:13 +03:00
|
|
|
println!("{:?} {:?}", argument, state.inner());
|
|
|
|
}
|