1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use tauri::{AppHandle, Runtime, State, Window};

use crate::{functions::SpectaFunctionArg, DataType, DefOpts, ExportError};

#[doc(hidden)]
pub enum TauriMarker {}

impl<R: Runtime> SpectaFunctionArg<TauriMarker> for Window<R> {
    fn to_datatype(_: DefOpts) -> Result<Option<DataType>, ExportError> {
        Ok(None)
    }
}

impl<'r, T: Send + Sync + 'static> SpectaFunctionArg<TauriMarker> for State<'r, T> {
    fn to_datatype(_: DefOpts) -> Result<Option<DataType>, ExportError> {
        Ok(None)
    }
}

impl<R: Runtime> SpectaFunctionArg<TauriMarker> for AppHandle<R> {
    fn to_datatype(_: DefOpts) -> Result<Option<DataType>, ExportError> {
        Ok(None)
    }
}