Skip to main content

open_opus/
status.rs

1use serde::Deserialize;
2
3#[derive(Debug, Clone, Deserialize)]
4#[serde(tag = "success")]
5pub enum Status {
6    #[serde(rename = "true")]
7    Ok(OkStatus),
8    #[serde(rename = "false")]
9    Err(ErrStatus),
10}
11
12#[derive(Debug, Clone, Deserialize)]
13pub struct OkStatus {
14    pub version: String, // common
15    pub source: String,
16    pub rows: u64,
17    #[serde(rename = "processingtime")]
18    pub processing_time: f64, // common
19    pub api: String, // common
20}
21
22#[derive(Debug, Clone, Deserialize)]
23pub struct ErrStatus {
24    pub version: String, // common
25    pub error: String,
26    #[serde(rename = "processingtime")]
27    pub processing_time: f64, // common
28    pub api: String, // common
29}