Enable connection type dump
This commit is contained in:
@ -9,7 +9,7 @@ use anyhow::Result;
|
||||
use base64::Engine;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
// "Value" would be OK. This is imported as "JValue" throughout the rest of this crate.
|
||||
/// "Value" would be OK. This is imported as "JValue" throughout the rest of this crate.
|
||||
// use serde_json::Value as JValue;
|
||||
// use std::collections::HashMap;
|
||||
|
||||
@ -213,30 +213,32 @@ pub struct WebrtcStats {
|
||||
|
||||
/// Client State Singleton Structures
|
||||
|
||||
/// The Engine Connection Type structure.
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||
#[derive(Default, Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||
#[ts(export)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct EngineConnectionType {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub connection_type: Option<String>,
|
||||
}
|
||||
pub struct EngineCommandManagerState {
|
||||
pub engine_connection: EngineConnectionState,
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||
#[ts(export)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct EngineConnectionState {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub state: EngineConnectionType,
|
||||
// #[serde(flatten)]
|
||||
// extra: HashMap<String, JValue>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||
#[ts(export)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct EngineCommandManagerState {
|
||||
pub meta: [u8; 0],
|
||||
pub engine_connection: EngineConnectionState,
|
||||
// extra: HashMap<String, JValue>,
|
||||
pub struct EngineConnectionState {
|
||||
/// #[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub state: EngineConnectionType,
|
||||
}
|
||||
|
||||
/// The Engine Connection Type structure.
|
||||
#[derive(Default, Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||
#[ts(export)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct EngineConnectionType {
|
||||
/// #[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[serde(rename = "type")]
|
||||
pub type_field: String,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||
|
||||
Reference in New Issue
Block a user