livesplit_core/settings/
settings_description.rs

1use super::Field;
2use crate::platform::prelude::*;
3use serde::{Deserialize, Serialize};
4
5/// A generic description of the settings available and their current values.
6#[derive(Default, Serialize, Deserialize)]
7pub struct SettingsDescription {
8    /// All of the different settings that are available and their current
9    /// values.
10    pub fields: Vec<Field>,
11}
12
13impl SettingsDescription {
14    /// Creates a new Settings Description with the settings provided.
15    pub fn with_fields(fields: Vec<Field>) -> Self {
16        Self { fields }
17    }
18}