Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
term_size - Rust
[go: Go Back, main page]

Crate term_size [] [src]

System calls for getting the terminal size.

Getting the terminal size is performed using an ioctl command that takes the file handle to the terminal -- which in this case, is stdout -- and populates a structure containing the values.

The size is needed when the user wants the output formatted into columns: the default grid view, or the hybrid grid-details view.

Functions

dimensions

Query the current processes's output, returning its width and height as a number of characters. Returns None if the output isn't to a terminal.

ioctl