tauri-store 1.2.2

Persistent stores for Tauri
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use tauri::{AppHandle, Runtime};

/// Plugin handle.
pub struct Handle<R: Runtime>(AppHandle<R>);

#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
impl<R: Runtime> Handle<R> {
  pub fn new(handle: AppHandle<R>) -> Self {
    Self(handle)
  }

  pub fn app(&self) -> &AppHandle<R> {
    &self.0
  }
}