tauri_plugin_intent/
models.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Deserialize, Serialize)]
4#[serde(rename_all = "camelCase")]
5pub struct OpenIntentRequest {
6 pub action: String,
7 pub data: Option<String>,
8 pub category: Option<String>,
9 pub mime_type: Option<String>,
10 pub package_name: Option<String>,
11 pub class_name: Option<String>,
12 pub flags: Option<Vec<String>>,
13 pub extras: Option<std::collections::HashMap<String, IntentExtra>>,
14}
15
16#[derive(Debug, Clone, Deserialize, Serialize)]
17#[serde(rename_all = "camelCase")]
18pub enum IntentExtra {
19 String(String),
20 Int(i32),
21 Long(i64),
22 Float(f32),
23 Double(f64),
24 Boolean(bool),
25 StringArray(Vec<String>),
26 IntArray(Vec<i32>),
27}
28
29#[derive(Debug, Clone, Default, Deserialize, Serialize)]
30#[serde(rename_all = "camelCase")]
31pub struct OpenIntentResponse {
32 pub success: bool,
33 pub error: Option<String>,
34}