use std::ops::{BitOr, BitOrAssign}; use crate::Style; impl>> BitOr for Set { type Output = Self; fn bitor(self, rhs: T) -> Self::Output { Set(PhantomData, self.1 | rhs.into().1) } } impl>> BitOr> for Set { type Output = Self; fn bitor(self, rhs: Set) -> Self::Output { Set(PhantomData, self.1 | rhs.1) } } impl>> BitOrAssign for Set { fn bitor_assign(&mut self, rhs: T) { self.1 |= rhs.into().1; } } impl BitOr for Emphasis { type Output = Style; fn bitor(self, rhs: Self) -> Style { let attribute = Set::from(self) | Set::from(rhs); Style { attribute, ..Default::default() } } } impl BitOr