tauri_plugin_screen_wake_lock/
models.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Deserialize, Serialize)]
4#[serde(rename_all = "camelCase")]
5pub struct SetEnabledRequest {
6  pub enabled: bool,
7  pub reason: Option<String>,
8  pub linux_options: Option<LinuxOptions>,
9}
10
11#[derive(Debug, Clone, Default, Deserialize, Serialize)]
12#[serde(rename_all = "camelCase")]
13pub struct LinuxOptions {
14  pub application_id: Option<String>,
15  pub reason: Option<String>,
16}
17
18#[derive(Debug, Clone, Deserialize, Serialize)]
19#[serde(rename_all = "camelCase")]
20pub struct SetEnabledResponse {
21  pub enabled: bool,
22}
23
24#[derive(Debug, Clone, Deserialize, Serialize)]
25#[serde(rename_all = "camelCase")]
26pub struct IsEnabledResponse {
27  pub enabled: bool,
28}
29
30#[derive(Debug, Clone, Deserialize, Serialize)]
31#[serde(rename_all = "camelCase")]
32pub struct IsSupportedResponse {
33  pub supported: bool,
34}