Unggahan awal
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
use serde::de::DeserializeOwned;
|
||||
use tauri::{plugin::PluginApi, AppHandle, Runtime};
|
||||
|
||||
use crate::models::*;
|
||||
|
||||
pub fn init<R: Runtime, C: DeserializeOwned>(
|
||||
app: &AppHandle<R>,
|
||||
_api: PluginApi<R, C>,
|
||||
) -> crate::Result<Bluclas<R>> {
|
||||
Ok(Bluclas(app.clone()))
|
||||
}
|
||||
|
||||
/// Access to the bluclas APIs.
|
||||
pub struct Bluclas<R: Runtime>(AppHandle<R>);
|
||||
|
||||
impl<R: Runtime> Bluclas<R> {
|
||||
pub fn ping(&self, payload: PingRequest) -> crate::Result<PingResponse> {
|
||||
Ok(PingResponse {
|
||||
value: payload.value,
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user