tauri/examples/commands/commands.rs

28 lines
611 B
Rust
Raw Normal View History

2023-02-19 16:17:49 +03:00
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use tauri::{command, State};
#[command]
pub fn cmd(_argument: String) {}
#[command]
pub fn invoke(_argument: String) {}
#[command]
pub fn message(_argument: String) {}
#[command]
pub fn resolver(_argument: String) {}
#[command]
pub fn simple_command(the_argument: String) {
2022-12-16 00:03:28 +03:00
println!("{the_argument}");
}
#[command]
pub fn stateful_command(the_argument: Option<String>, state: State<'_, super::MyState>) {
println!("{:?} {:?}", the_argument, state.inner());
}