devela::_dep::rustix::termios

Function tcsetattr

pub fn tcsetattr<Fd>(
    fd: Fd,
    optional_actions: OptionalActions,
    termios: &Termios,
) -> Result<(), Errno> 
where Fd: AsFd,
Available on crate feature dep_rustix only.
Expand description

tcsetattr(fd)—Set terminal attributes.

Also known as the TCSETS (or TCSETS2 on Linux) operation with ioctl.

On Linux, this uses TCSETS2. If that fails in a way that indicates that the host doesn’t support it, this falls back to the old TCSETS, and fails with io::Errno::RANGE if the input or output speeds cannot be supported.

§References