Expand description
Support access to the console.
The input and output are split and are accessed in a way very similiar to stdin/stdout with a similiar interface. The console will be attached to /dev/tty on unix and CONIN$/CONOUT$ on Windows. This means it bypasses stdin/out, if they were not redirected then they should be the same but even if redirected conin()/conout() will attach to the tty or console directly.
The con_init() function should be called once (it is safe to call multiple times) and if it returns an error then no tty/console is available. If con_init() fails then calls to conin()/conout() will panic. It is ok to call conin_r()/conout_r() but you will have to deal with the error and conin()/conout() will always work if con_init() was successful.
Structs§
- Represents the input side of the tty/console terminal.
- Represents the output side of the tty/console terminal.
- Represents the input side of the tty/console terminal.
- A locked console input device.
- Represents the output side of the tty/console terminal.
- A locked console output device.
Traits§
- Console input trait.
- Console output trait.
Functions§
- Initialize the console lib.
- Lock and return read side of the tty/console for the application.
- Lock and return read side of the tty/console for the application.
- Lock and return write side of the tty/console for the application.
- Lock and return write side of the tty/console for the application.