tauri_plugin_js/
models.rs1use serde::{Deserialize, Serialize};
2use std::collections::HashMap;
3
4#[derive(Debug, Clone, Deserialize, Serialize)]
5#[serde(rename_all = "camelCase")]
6pub struct SpawnConfig {
7 pub runtime: Option<String>,
9 pub command: Option<String>,
11 pub sidecar: Option<String>,
13 pub script: Option<String>,
15 pub args: Option<Vec<String>>,
17 pub cwd: Option<String>,
19 pub env: Option<HashMap<String, String>>,
21}
22
23#[derive(Debug, Clone, Serialize, Deserialize)]
24#[serde(rename_all = "camelCase")]
25pub struct ProcessInfo {
26 pub name: String,
27 pub pid: Option<u32>,
28 pub running: bool,
29}
30
31#[derive(Debug, Clone, Serialize)]
32#[serde(rename_all = "camelCase")]
33pub struct StdioEventPayload {
34 pub name: String,
35 pub data: String,
36}
37
38#[derive(Debug, Clone, Serialize)]
39#[serde(rename_all = "camelCase")]
40pub struct ExitEventPayload {
41 pub name: String,
42 pub code: Option<i32>,
43}
44
45#[derive(Debug, Clone, Serialize, Deserialize)]
46#[serde(rename_all = "camelCase")]
47pub struct RuntimeInfo {
48 pub name: String,
49 pub path: Option<String>,
50 pub version: Option<String>,
51 pub available: bool,
52}