xref: /third_party/rust/crates/rustix/src/termios/cf.rs (revision b8a62b91)
1use crate::termios::{Speed, Termios};
2use crate::{backend, io};
3
4/// `cfgetospeed(termios)`
5#[inline]
6#[must_use]
7pub fn cfgetospeed(termios: &Termios) -> Speed {
8    backend::termios::syscalls::cfgetospeed(termios)
9}
10
11/// `cfgetispeed(termios)`
12#[inline]
13#[must_use]
14pub fn cfgetispeed(termios: &Termios) -> Speed {
15    backend::termios::syscalls::cfgetispeed(termios)
16}
17
18/// `cfmakeraw(termios)`
19#[inline]
20pub fn cfmakeraw(termios: &mut Termios) {
21    backend::termios::syscalls::cfmakeraw(termios)
22}
23
24/// `cfsetospeed(termios, speed)`
25#[inline]
26pub fn cfsetospeed(termios: &mut Termios, speed: Speed) -> io::Result<()> {
27    backend::termios::syscalls::cfsetospeed(termios, speed)
28}
29
30/// `cfsetispeed(termios, speed)`
31#[inline]
32pub fn cfsetispeed(termios: &mut Termios, speed: Speed) -> io::Result<()> {
33    backend::termios::syscalls::cfsetispeed(termios, speed)
34}
35
36/// `cfsetspeed(termios, speed)`
37#[inline]
38pub fn cfsetspeed(termios: &mut Termios, speed: Speed) -> io::Result<()> {
39    backend::termios::syscalls::cfsetspeed(termios, speed)
40}
41