Module test::term

source ·
🔬This is a nightly-only experimental API. (test)
Expand description

Terminal formatting module.

This module provides the Terminal trait, which abstracts over an ANSI Terminal to provide color printing, among other things. There are two implementations, the TerminfoTerminal, which uses control characters from a terminfo database, and WinConsole, which uses the Win32 Console API.

Modules

  • color 🔒 Experimental
    Terminal color definitions
  • terminfo 🔒 Experimental
    Terminfo database interface.

Traits

  • TerminalExperimental
    A terminal with similar capabilities to an ANSI Terminal (foreground/background colors etc).

Functions

  • stdout 🔒 Experimental
    Returns a Terminal wrapping stdout, or None if a terminal couldn’t be opened.

Type Definitions