use crate::condition::ValueCondition;
use get_size::GetSize;
use get_size_derive::GetSize;
#[derive(Clone, Debug, Default, GetSize)]
pub struct ValueStyleMap {
condition: ValueCondition,
applied_style: String, }
impl ValueStyleMap {
pub fn new<T: AsRef<str>>(condition: ValueCondition, applied_style: T) -> Self {
Self {
condition,
applied_style: applied_style.as_ref().to_string(),
}
}
pub fn condition(&self) -> &ValueCondition {
&self.condition
}
pub fn set_condition(&mut self, cond: ValueCondition) {
self.condition = cond;
}
pub fn applied_style(&self) -> &String {
&self.applied_style
}
pub fn set_applied_style<S: AsRef<str>>(&mut self, style: S) {
self.applied_style = style.as_ref().to_string();
}
}