tauri_plugin_use_ffmpeg/
models.rs1use serde::{Deserialize, Serialize};
6
7#[derive(Debug, Clone, Deserialize, Serialize)]
9#[serde(rename_all = "camelCase")]
10pub struct DownloadConfig {
11 pub url: String,
13 pub executable_path: String,
15}
16
17#[derive(Debug, Deserialize, Serialize)]
19#[serde(rename_all = "camelCase")]
20pub struct DownloadRequest {
21 pub config: Option<DownloadConfig>,
23}
24
25#[derive(Debug, Clone, Deserialize, Serialize)]
27#[serde(rename_all = "camelCase")]
28pub struct DownloadResponse {
29 pub success: bool,
31 pub path: Option<String>,
33 pub message: Option<String>,
35}
36
37#[derive(Debug, Clone, Deserialize, Serialize)]
39#[serde(rename_all = "camelCase")]
40pub struct CheckResponse {
41 pub available: bool,
43 pub path: Option<String>,
45 pub version: Option<String>,
47}
48
49#[derive(Debug, Clone, Deserialize, Serialize)]
51#[serde(rename_all = "camelCase")]
52pub struct ExecuteRequest {
53 pub args: Vec<String>,
55}
56
57#[derive(Debug, Clone, Deserialize, Serialize)]
59#[serde(rename_all = "camelCase")]
60pub struct ExecuteResponse {
61 pub success: bool,
63 pub stdout: String,
65 pub stderr: String,
67 pub exit_code: Option<i32>,
69}
70
71#[derive(Debug, Clone, Deserialize, Serialize)]
73#[serde(rename_all = "camelCase")]
74pub struct DownloadProgress {
75 pub downloaded: u64,
77 pub total: Option<u64>,
79 pub percentage: Option<f64>,
81}
82
83#[derive(Debug, Clone, Deserialize, Serialize)]
85#[serde(rename_all = "camelCase")]
86pub struct DeleteResponse {
87 pub success: bool,
89 pub message: Option<String>,
91}