|
1 | | -# Stdin := [].{ |
2 | | -# ## **NotFound** - An entity was not found, often a file. |
3 | | -# ## |
4 | | -# ## **PermissionDenied** - The operation lacked the necessary privileges to complete. |
5 | | -# ## |
6 | | -# ## **BrokenPipe** - The operation failed because a pipe was closed. |
7 | | -# ## |
8 | | -# ## **AlreadyExists** - An entity already exists, often a file. |
9 | | -# ## |
10 | | -# ## **Interrupted** - This operation was interrupted. Interrupted operations can typically be retried. |
11 | | -# ## |
12 | | -# ## **Unsupported** - This operation is unsupported on this platform. This means that the operation can never succeed. |
13 | | -# ## |
14 | | -# ## **OutOfMemory** - An operation could not be completed, because it failed to allocate enough memory. |
15 | | -# ## |
16 | | -# ## **Other** - A custom error that does not fall under any other I/O error kind. |
17 | | -# IOErr := [ |
18 | | -# NotFound, |
19 | | -# PermissionDenied, |
20 | | -# BrokenPipe, |
21 | | -# AlreadyExists, |
22 | | -# Interrupted, |
23 | | -# Unsupported, |
24 | | -# OutOfMemory, |
25 | | -# Other(Str), |
26 | | -# ] |
27 | | -# |
28 | | -# ## Read a line from [standard input](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)). |
29 | | -# ## |
30 | | -# ## > This task will block the program from continuing until `stdin` receives a newline character |
31 | | -# ## (e.g. because the user pressed Enter in the terminal), so using it can result in the appearance of the |
32 | | -# ## programming having gotten stuck. It's often helpful to print a prompt first, so |
33 | | -# ## the user knows it's necessary to enter something before the program will continue. |
34 | | -# line! : () => Str |
35 | | -# |
36 | | -# ## Read bytes from [standard input](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)). |
37 | | -# ## This function can read no more than 16,384 bytes at a time. Use [read_to_end!] if you need more. |
38 | | -# ## |
39 | | -# ## > This is typically used in combintation with [Tty.enable_raw_mode!], |
40 | | -# ## which disables defaults terminal bevahiour and allows reading input |
41 | | -# ## without buffering until Enter key is pressed. |
42 | | -# bytes! : () => List(U8) |
43 | | -# |
44 | | -# ## Read all bytes from [standard input](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)) |
45 | | -# ## until [EOF](https://en.wikipedia.org/wiki/End-of-file) in this source. |
46 | | -# read_to_end! : () => List(U8) |
47 | | -# } |
| 1 | +Stdin := [].{ |
| 2 | + ## **NotFound** - An entity was not found, often a file. |
| 3 | + ## |
| 4 | + ## **PermissionDenied** - The operation lacked the necessary privileges to complete. |
| 5 | + ## |
| 6 | + ## **BrokenPipe** - The operation failed because a pipe was closed. |
| 7 | + ## |
| 8 | + ## **AlreadyExists** - An entity already exists, often a file. |
| 9 | + ## |
| 10 | + ## **Interrupted** - This operation was interrupted. Interrupted operations can typically be retried. |
| 11 | + ## |
| 12 | + ## **Unsupported** - This operation is unsupported on this platform. This means that the operation can never succeed. |
| 13 | + ## |
| 14 | + ## **OutOfMemory** - An operation could not be completed, because it failed to allocate enough memory. |
| 15 | + ## |
| 16 | + ## **Other** - A custom error that does not fall under any other I/O error kind. |
| 17 | + IOErr := [ |
| 18 | + NotFound, |
| 19 | + PermissionDenied, |
| 20 | + BrokenPipe, |
| 21 | + AlreadyExists, |
| 22 | + Interrupted, |
| 23 | + Unsupported, |
| 24 | + OutOfMemory, |
| 25 | + Other(Str), |
| 26 | + ] |
| 27 | + |
| 28 | + ## Read a line from [standard input](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)). |
| 29 | + ## |
| 30 | + ## > This task will block the program from continuing until `stdin` receives a newline character |
| 31 | + ## (e.g. because the user pressed Enter in the terminal), so using it can result in the appearance of the |
| 32 | + ## program having gotten stuck. It's often helpful to print a prompt first, so |
| 33 | + ## the user knows it's necessary to enter something before the program will continue. |
| 34 | + line! : {} => Str |
| 35 | + |
| 36 | + # ## Read bytes from [standard input](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)). |
| 37 | + # ## This function can read no more than 16,384 bytes at a time. Use [read_to_end!] if you need more. |
| 38 | + # ## |
| 39 | + # ## > This is typically used in combintation with [Tty.enable_raw_mode!], |
| 40 | + # ## which disables defaults terminal bevahiour and allows reading input |
| 41 | + # ## without buffering until Enter key is pressed. |
| 42 | + # bytes! : {} => List(U8) |
| 43 | + |
| 44 | + # ## Read all bytes from [standard input](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)) |
| 45 | + # ## until [EOF](https://en.wikipedia.org/wiki/End-of-file) in this source. |
| 46 | + # read_to_end! : {} => List(U8) |
| 47 | +} |
0 commit comments