[][src]Crate vt

vt-rs

Rust bindings for the Linux virtual terminal APIs.

use vt::Console;
 
// First of all, get a handle to the console
let console = Console::open().unwrap();
 
// Allocate a new virtual terminal
let mut vt = console.new_vt().unwrap();
 
// Write something to it.
// A `Vt` structure implements both `std::io::Read` and `std::io::Write`.
writeln!(vt, "Hello world!");
 
// Switch to the newly allocated terminal
vt.switch().unwrap();

For a more complete example, see the files in the examples folder.

Structs

Console

Handle to a console device file, usually located at /dev/console. This structure allows managing virtual terminals.

Vt

An allocated virtual terminal.

VtNumber

Number of a virtual terminal.

VtSignals

Enum containing all the signals supported by the virtual terminal. Use Vt::signals to manage the signals enabled in a virtual terminal.

Enums

VtFlushType

Enum containing the VT buffers to flush.

Traits

AsVtNumber

A trait to extract the raw terminal number from an object.