tailwind_css/traits/
instance.rs1use super::*;
2
3impl Debug for Box<dyn TailwindInstance> {
4 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
5 f.write_str(&self.id())
6 }
7}
8
9impl Hash for Box<dyn TailwindInstance> {
10 fn hash<H: Hasher>(&self, state: &mut H) {
11 self.id().hash(state)
12 }
13}
14
15impl PartialEq for Box<dyn TailwindInstance> {
16 fn eq(&self, other: &Self) -> bool {
17 self.id().eq(&other.id())
18 }
19}
20
21impl Eq for Box<dyn TailwindInstance> {}
22
23impl PartialOrd for Box<dyn TailwindInstance> {
24 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
25 self.id().partial_cmp(&other.id())
26 }
27}
28
29impl Ord for Box<dyn TailwindInstance> {
30 fn cmp(&self, other: &Self) -> Ordering {
31 self.id().cmp(&other.id())
32 }
33}