use crate::{normal, extend};
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum AttributesColorPairSet {
Normal(normal::AttributesColorPair),
Extend(extend::AttributesColorPair)
}
impl AttributesColorPairSet {
pub fn unwrap_as_normal(&self) -> normal::AttributesColorPair {
if let AttributesColorPairSet::Normal(attributes_colorpair) = *self {
attributes_colorpair
} else {
panic!("failed to unwrap AttributesColorPairSet::Normal()!!!")
}
}
pub fn unwrap_as_extend(&self) -> extend::AttributesColorPair {
if let AttributesColorPairSet::Extend(attributes_colorpair) = *self {
attributes_colorpair
} else {
panic!("failed to unwrap AttributesColorPairSet::Extended()!!!")
}
}
}