devela::_dep::rustix::io

Function is_read_write

pub fn is_read_write<Fd>(fd: Fd) -> Result<(bool, bool), Errno> 
where Fd: AsFd,
Available on crate feature dep_rustix 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.