Function rustix::io::is_read_write

source ·
pub fn is_read_write<Fd: AsFd>(fd: Fd) -> Result<(bool, bool)>
Available on crate features fs and net only.
Expand description

Returns a pair of booleans indicating whether the file descriptor is readable and/or writable, respectively.

Unlike is_file_read_write, this correctly detects whether sockets have been shutdown, partially or completely.