tauri-plugin-nosleep 2.0.0-beta.1

Tauri plugin to prevent the power save functionality in the OS
1
2
3
4
5
6
7
8
9
10
11
12
use serde::de::DeserializeOwned;
use tauri::{plugin::PluginApi, AppHandle, Runtime};

pub fn init<R: Runtime, C: DeserializeOwned>(
    app: &AppHandle<R>,
    _api: PluginApi<R, C>,
) -> crate::Result<Nosleep<R>> {
    Ok(Nosleep(app.clone()))
}

/// Access to the nosleep APIs.
pub struct Nosleep<R: Runtime>(AppHandle<R>);