use crate::settings::{SettingsDescription, Value};
use serde::{Deserialize, Serialize};
#[derive(Default, Clone)]
pub struct Component;
#[derive(Default, Serialize, Deserialize)]
pub struct State;
#[cfg(feature = "std")]
impl State {
pub fn write_json<W>(&self, writer: W) -> serde_json::Result<()>
where
W: std::io::Write,
{
serde_json::to_writer(writer, self)
}
}
impl Component {
pub fn new() -> Self {
Default::default()
}
pub const fn name(&self) -> &'static str {
"Separator"
}
pub fn update_state(&self, _state: &mut State) {}
pub const fn state(&self) -> State {
State
}
pub fn settings_description(&self) -> SettingsDescription {
SettingsDescription::default()
}
#[allow(clippy::needless_pass_by_value)]
pub fn set_value(&mut self, _index: usize, _value: Value) {}
}