discloud_rs/app/manage/
stop.rs

1use serde::Deserialize;
2
3use crate::Error;
4
5#[derive(Deserialize, Debug, Clone)]
6#[serde(rename_all = "camelCase")]
7pub struct AppStopAll {
8    pub already_in_process: Vec<String>,
9    pub already_offline: Vec<String>,
10    pub stopped: Vec<String>,
11}
12
13#[derive(Deserialize, Debug, Clone)]
14#[serde(rename_all = "camelCase")]
15pub struct AppStopResponseUnique {
16    pub message: String,
17    pub status: String,
18}
19
20#[derive(Deserialize, Debug, Clone)]
21#[serde(rename_all = "camelCase")]
22pub struct AppStopResponseAll {
23    pub message: String,
24    pub status: String,
25    pub apps: AppStopAll,
26}
27
28#[derive(Debug)]
29pub enum AppStopError {
30    AlreadyOffline,
31    Other(Error),
32}
33
34impl From<Error> for AppStopError {
35    fn from(error: Error) -> Self {
36        Self::Other(error)
37    }
38}