mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-11 10:43:31 +02:00
25 lines
556 B
Rust
25 lines
556 B
Rust
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
use tauri::ipc::Channel;
|
|
|
|
#[derive(Serialize)]
|
|
pub struct Event {
|
|
pub kind: String,
|
|
pub value: Option<String>,
|
|
}
|
|
|
|
#[derive(Serialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct PingRequest {
|
|
pub value: Option<String>,
|
|
pub on_event: Channel<Event>,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
|
|
pub struct PingResponse {
|
|
pub value: Option<String>,
|
|
}
|