This repository has been archived on 2024-04-22. You can view files and clone it, but cannot push or open issues or pull requests.
caylon/backend/caylon-config/src/element.rs

21 lines
653 B
Rust
Raw Normal View History

2022-08-07 20:57:41 +01:00
use serde::{Serialize, Deserialize};
use super::{ButtonConfig, ToggleConfig, SliderConfig, ReadingConfig, ResultDisplayConfig, EventDisplayConfig};
2022-08-07 20:57:41 +01:00
2023-03-10 02:16:29 +00:00
#[derive(Serialize, Deserialize, Clone, PartialEq)]
2022-08-07 20:57:41 +01:00
#[serde(tag = "element")]
pub enum ElementConfig {
#[serde(rename = "button")]
Button(ButtonConfig),
#[serde(rename = "toggle")]
Toggle(ToggleConfig),
#[serde(rename = "slider")]
Slider(SliderConfig),
#[serde(rename = "reading")]
2022-09-12 04:45:31 +01:00
ReadingDisplay(ReadingConfig),
#[serde(rename = "result-display")]
ResultDisplay(ResultDisplayConfig),
#[serde(rename = "event-display")]
EventDisplay(EventDisplayConfig)
2022-08-07 20:57:41 +01:00
}