ioctl-term-light 0.2.0

Lightweight crate to retrieve the dimensions (.i.e.: width/height) of a UNIX terminal in terms of rows/columns.
Documentation
  • Coverage
  • 29.17%
    7 out of 24 items documented4 out of 15 items with examples
  • Size
  • Source code size: 20.32 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 504.17 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • gabrielfalcao

ioctl-term-light

Lightweight crate to retrieve the dimensions (.i.e.: width/height) of a UNIX terminal in terms of rows/columns.

Examples

use ioctl_term_light::{cols, rows};

assert_eq!(cols(), 130)
assert_eq!(rows(), 33)
use ioctl_term_light::{tuple_from_raw_fd, Stdout};

assert_eq!(tuple_from_raw_fd(Stdout), (130, 33));

Crate Features

fd

Enables the FileDescriptor enum.

any-fd

Enables the Any(i32) variant in the FileDescriptor enum.

stdio

Enables the modules:

stderr

Enables the module ioctl_term_light::stderr.

stdin

Enables the module ioctl_term_light::stdin.

stdout

Enables the module ioctl_term_light::stdout.

u8

Enables conversion from u16 to u8 within the dimensions module