#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub struct Modifiers(u8);
impl Modifiers {
pub const BOLD: Self = Self(1 << 0);
pub const DIM: Self = Self(1 << 1);
pub const ITALIC: Self = Self(1 << 2);
pub const UNDERLINE: Self = Self(1 << 3);
pub const REVERSED: Self = Self(1 << 4);
pub fn contains(self, other: Self) -> bool {
self.0 & other.0 == other.0
}
pub(crate) fn is_empty(self) -> bool {
self.0 == 0
}
pub(crate) fn insert(&mut self, other: Self) {
self.0 |= other.0;
}
}