1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
use std::collections::btree_map::Iter;
use super::*;
mod traits;
#[derive(Debug, Clone, Default, Ord, PartialOrd, Eq, PartialEq, Hash)]
pub struct CssAttributes {
normal: BTreeMap<String, String>,
transforms: BTreeSet<String>,
}
impl CssAttributes {
pub fn insert<K, V>(&mut self, key: K, value: V)
where
K: Into<String>,
V: Into<String>,
{
self.normal.insert(key.into(), value.into());
}
pub fn extend<T>(&mut self, items: T)
where
T: IntoIterator<Item = (String, String)>,
{
self.normal.extend(items)
}
pub fn transform<V>(&mut self, value: V)
where
V: Into<String>,
{
self.transforms.insert(value.into());
}
pub fn iter(&self) -> Iter<'_, String, String> {
self.normal.iter()
}
}