File tree 1 file changed +31
-1
lines changed
1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change 10
10
11
11
/*!
12
12
13
- Basic input/output
13
+ The `io` module contains basic input and output routines.
14
+
15
+ A quick summary:
16
+
17
+ ## `Reader` and `Writer` traits
18
+
19
+ These traits define the minimal set of methods that anything that can do
20
+ input and output should implement.
21
+
22
+ ## `ReaderUtil` and `WriterUtil` traits
23
+
24
+ Richer methods that allow you to do more. `Reader` only lets you read a certain
25
+ number of bytes into a buffer, while `ReaderUtil` allows you to read a whole
26
+ line, for example.
27
+
28
+ Generally, these richer methods are probably the ones you want to actually
29
+ use in day-to-day Rust.
30
+
31
+ Furthermore, because there is an implementation of `ReaderUtil` for
32
+ `<T: Reader>`, when your input or output code implements `Reader`, you get
33
+ all of these methods for free.
34
+
35
+ ## `print` and `println`
36
+
37
+ These very useful functions are defined here. You generally don't need to
38
+ import them, though, as the prelude already does.
39
+
40
+ ## `stdin`, `stdout`, and `stderr`
41
+
42
+ These functions return references to the classic three file descriptors. They
43
+ implement `Reader` and `Writer`, where appropriate.
14
44
15
45
*/
16
46
You can’t perform that action at this time.
0 commit comments