Lines Matching defs:cfgetispeed
54 //! * `cfgetispeed()` - Returns `u32` on BSDs, `BaudRate` on Android/Linux
76 //! # use nix::sys::termios::{BaudRate, cfgetispeed, cfgetospeed, cfsetispeed, cfsetspeed, Termios};
80 //! let speed = cfgetispeed(&t);
86 //! On non-BSDs, `cfgetispeed()` and `cfgetospeed()` both return a `BaudRate`:
110 //! # use nix::sys::termios::{BaudRate, cfgetispeed, cfgetospeed, cfsetspeed, Termios};
114 //! assert_eq!(cfgetispeed(&t), BaudRate::B9600);
119 //! But on the BSDs, `cfgetispeed()` and `cfgetospeed()` both return `u32`s:
143 //! # use nix::sys::termios::{BaudRate, cfgetispeed, cfgetospeed, cfsetspeed, Termios};
147 //! assert_eq!(cfgetispeed(&t), 9600u32);
176 //! # use nix::sys::termios::{BaudRate, cfgetispeed, cfsetspeed, Termios};
180 //! assert_eq!(cfgetispeed(&t), BaudRate::B9600.into());
1000 /// [cfgetispeed(3p)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/cfgetispeed.html)).
1002 /// `cfgetispeed()` extracts the input baud rate from the given `Termios` structure.
1005 pub fn cfgetispeed(termios: &Termios) -> u32 {
1007 unsafe { libc::cfgetispeed(&*inner_termios) as u32 }
1058 /// [cfgetispeed(3p)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/cfgetispeed.html)).
1060 /// `cfgetispeed()` extracts the input baud rate from the given `Termios` structure.
1061 pub fn cfgetispeed(termios: &Termios) -> BaudRate {
1063 unsafe { libc::cfgetispeed(&*inner_termios) }.try_into().unwrap()