entity_graph_tauri/
desktop.rs

1use serde::de::DeserializeOwned;
2use std::marker::PhantomData;
3use tauri::{plugin::PluginApi, AppHandle, Runtime};
4
5use crate::{PlatformPing, Result};
6
7pub fn init<R: Runtime, C: DeserializeOwned>(
8    _app: &AppHandle<R>,
9    _api: PluginApi<R, C>,
10) -> Result<EntityGraph<R>> {
11    Ok(EntityGraph(PhantomData))
12}
13
14/// Desktop-side native bridge handle.
15pub struct EntityGraph<R: Runtime>(PhantomData<fn() -> R>);
16
17impl<R: Runtime> EntityGraph<R> {
18    /// A host-level smoke command that does not depend on remote sync.
19    pub fn ping(&self) -> Result<PlatformPing> {
20        Ok(PlatformPing {
21            plugin: "entity-graph-tauri".to_owned(),
22            platform: "desktop".to_owned(),
23        })
24    }
25}