pub unsafe fn terminal_size_using_fd(fd: RawFd) -> Option<(Width, Height)>
👎Deprecated: Use terminal_size_of instead. Use BorrowedFd::borrow_raw to convert a raw fd into a BorrowedFd if needed.
Expand description

Returns the size of the terminal using the given raw file descriptor, if available.

The given file descriptor must be an open file descriptor.

If the given file descriptor is not a tty, returns None

Safety

fd must be a valid open file descriptor.