Lines Matching refs:cfgetospeed
55 //! * `cfgetospeed()` - Returns `u32` on BSDs, `BaudRate` on Android/Linux
76 //! # use nix::sys::termios::{BaudRate, cfgetispeed, cfgetospeed, cfsetispeed, cfsetspeed, Termios};
81 //! assert_eq!(speed, cfgetospeed(&t));
86 //! On non-BSDs, `cfgetispeed()` and `cfgetospeed()` both return a `BaudRate`:
110 //! # use nix::sys::termios::{BaudRate, cfgetispeed, cfgetospeed, cfsetspeed, Termios};
115 //! assert_eq!(cfgetospeed(&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};
148 //! assert_eq!(cfgetospeed(&t), 9600u32);
1011 /// [cfgetospeed(3p)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/cfgetospeed.html)).
1013 /// `cfgetospeed()` extracts the output baud rate from the given `Termios` structure.
1016 pub fn cfgetospeed(termios: &Termios) -> u32 {
1018 unsafe { libc::cfgetospeed(&*inner_termios) as u32 }
1067 /// [cfgetospeed(3p)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/cfgetospeed.html)).
1069 /// `cfgetospeed()` extracts the output baud rate from the given `Termios` structure.
1070 pub fn cfgetospeed(termios: &Termios) -> BaudRate {
1072 unsafe { libc::cfgetospeed(&*inner_termios) }.try_into().unwrap()