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
use Error;
/// [BlockingWrite] is the library's abstraction for blocking write I/O.
///
/// It is similar to `std::io::Write`, and there is a blanket implementation of [BlockingWrite] for
/// any implementation of `Write`. The reason for introducing [BlockingWrite] is that it allows
/// json-streaming to be used in a `no-std` environment.
///
/// Note that json-streaming writes data to a [BlockingWrite] in many small chunks without any I/O
/// buffering. It is the client's responsibility to use `std::io::BufWriter` or similar for
/// improved performance where desired.
/// Blanket implementation that allows any [std::io::Write] implementation to be used seamlessly as
/// [BlockingWrite].
/// [BlockingRead] is the library's abstraction for blocking read I/O.
///
/// It is similar to `std:io::Read`, and there is a blanket implementation of [BlockingRead] for
/// any implementation of `Read`. The reason for introducing [BlockingRead] is that it allows
/// json-streaming in a `no-std` environment.
///
/// Note that json-streaming reads data from a [BlockingRead] in many small chunks without any I/O
/// buffering. It is the client's responsibility to use `std::io::BufRead` or similar for
/// improved performance where desired.
/// Blanket implementation that allows any [std::io::Read] implementation to be used seamlessly as
/// [BlockingRead].