Expand description
§Console Traits
Contains a trait which describes a console. A console is a rectangular monospaced text display, of a certain width and height. You can write Unicode text to it.
Currently we assume UNIX LF sematics - that is a sole LF implies a new line and carriage return (as distinct to Windows semantics where you would need to send a CRLF pair).
Implementors should handle the following Unicode characters specially:
- 0x08 (BS) - Backspaces one character (and erases it)
- 0x09 (TAB) - Move to next tab stop, or the end of the line if no tab stops left.
- 0x0A (LF) - Line feed.
- 0x0D (CR) - Carriage return.
- 0x7F (DEL) - Ignored.
Structs§
- Col
- Describes a vertical column on the screen. Zero is on the left.
- Position
- Describes a place on the screen. (0, 0) is the top left.
- Row
- Identifies a horizontal row on the screen. Zero is at the top.
Enums§
- Control
Char Mode - How to handle Control Characters
- Escape
Char Mode - Special
Char - Special types of character we need to interpret
Traits§
- Ascii
Console - Refinement of
BaseConsole
which supports 8-bit characters. Use this is you are implementing an old-fashioned ASCII console (including extended ASCII, like Code Page 850, or ISO 8859-1). - Base
Console - Abstraction for our console. We can move the cursor around and write text
to it. You should use either
UnicodeConsole
orAsciiConsole
depending on whether you want full Unicode support (&str
,char
, etc), or just 8-bit characters (&[u8]
andu8
). - Unicode
Console - Refinement of
BaseConsole
which supports Unicode characters. Use this is you are implementing a modern console with Unicode support.