@@ -8,13 +8,14 @@ documentation = "https://docs.rs/quick-xml"
8
8
repository = " https://github.com/tafia/quick-xml"
9
9
10
10
keywords = [" xml" , " serde" , " parser" , " writer" , " html" ]
11
- categories = [" encoding" , " parsing" , " parser-implementations" ]
11
+ categories = [" asynchronous " , " encoding" , " parsing" , " parser-implementations" ]
12
12
license = " MIT"
13
13
14
14
[dependencies ]
15
15
document-features = { version = " 0.2" , optional = true }
16
16
encoding_rs = { version = " 0.8" , optional = true }
17
17
serde = { version = " 1.0" , optional = true }
18
+ tokio = { version = " 1.20" , optional = true , default-features = false , features = [" io-util" ] }
18
19
memchr = " 2.5"
19
20
20
21
[dev-dependencies ]
@@ -23,6 +24,8 @@ pretty_assertions = "1.2"
23
24
regex = " 1"
24
25
serde = { version = " 1.0" , features = [" derive" ] }
25
26
serde-value = " 0.7"
27
+ tokio = { version = " 1.20" , default-features = false , features = [" macros" , " rt" ] }
28
+ tokio-test = " 0.4"
26
29
27
30
[lib ]
28
31
bench = false
@@ -37,6 +40,13 @@ harness = false
37
40
38
41
[features ]
39
42
default = []
43
+
44
+ # # Enables support for asynchronous reading from `tokio`'s IO-Traits by enabling
45
+ # # [reading events] from types implementing [`tokio::io::AsyncBufRead`].
46
+ # #
47
+ # # [reading events]: crate::reader::Reader::read_event_into_async
48
+ async-tokio = [" tokio" ]
49
+
40
50
# # Enables support of non-UTF-8 encoded documents. Encoding will be inferred from
41
51
# # the XML declaration if it will be found, otherwise UTF-8 is assumed.
42
52
# #
@@ -123,3 +133,7 @@ required-features = ["serialize"]
123
133
[[test ]]
124
134
name = " serde-migrated"
125
135
required-features = [" serialize" ]
136
+
137
+ [[test ]]
138
+ name = " async-tokio"
139
+ required-features = [" async-tokio" ]
0 commit comments