| Crates.io | ioctl-term-light |
| lib.rs | ioctl-term-light |
| version | 0.2.0 |
| created_at | 2025-07-21 21:36:46.684491+00 |
| updated_at | 2025-07-23 23:32:02.919779+00 |
| description | Lightweight crate to retrieve the dimensions (.i.e.: width/height) of a UNIX terminal in terms of rows/columns. |
| homepage | https://github.com/gabrielfalcao/utf8-rune |
| repository | |
| max_upload_size | |
| id | 1762706 |
| size | 20,324 |
Lightweight crate to retrieve the dimensions (.i.e.: width/height) of a UNIX terminal in terms of rows/columns.
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));
fdEnables the FileDescriptor enum.
any-fdEnables the Any(i32) variant in the FileDescriptor enum.
stdioEnables the modules:
stderrEnables the module ioctl_term_light::stderr.
stdinEnables the module ioctl_term_light::stdin.
stdoutEnables the module ioctl_term_light::stdout.
u8Enables conversion from u16 to u8 within the dimensions module