use super::{ComponentSettings, GeneralSettings};
use crate::platform::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Serialize, Deserialize)]
pub struct LayoutSettings {
pub components: Vec<ComponentSettings>,
pub general: GeneralSettings,
}
#[cfg(feature = "std")]
impl LayoutSettings {
pub fn from_json<R>(reader: R) -> serde_json::Result<LayoutSettings>
where
R: std::io::Read,
{
serde_json::from_reader(reader)
}
pub fn write_json<W>(&self, writer: W) -> serde_json::Result<()>
where
W: std::io::Write,
{
serde_json::to_writer(writer, self)
}
}