1use core::fmt::{Display, Formatter, Result};
2
3use crate::{Style, impl_macros::from_to::impl_from_to};
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
13pub struct Reset;
14
15impl_from_to!(
16 #[doc = r"Converts the type into a [`Style`]."]
17 fn to_style(self: Reset) -> Style {
18 Style::new()
19 }
20);
21
22impl Display for Reset {
23 fn fmt(&self, f: &mut Formatter<'_>) -> Result {
24 write!(f, "{}", Style::new())
25 }
26}
27
28impl PartialEq<Style> for Reset {
29 fn eq(&self, other: &Style) -> bool {
30 self.to_style() == *other
31 }
32}