| 1 |
//! Terminal I/O stream operations. |
| 2 |
//! |
| 3 |
//! This API automatically supports setting arbitrary I/O speeds, on any |
| 4 |
//! platform that supports them, including Linux and the BSDs. |
| 5 |
//! |
| 6 |
//! The [`speed`] module contains various predefined speed constants which are |
| 7 |
//! more likely to be portable, however any `u32` value can be passed to |
| 8 |
//! [`Termios::set_speed`], [`Termios::set_input_speed`], and |
| 9 |
//! [`Termios::set_output_speed`], and they will simply fail if the speed is |
| 10 |
//! not supported by the platform or the device. |
| 11 |
|
| 12 |
#[cfg(not(any( |
| 13 |
target_os = "cygwin", |
| 14 |
target_os = "espidf", |
| 15 |
target_os = "haiku", |
| 16 |
target_os = "wasi", |
| 17 |
)))] |
| 18 |
mod ioctl; |
| 19 |
#[cfg(not(target_os = "wasi"))] |
| 20 |
mod tc; |
| 21 |
#[cfg(not(windows))] |
| 22 |
mod tty; |
| 23 |
#[cfg(not(any(target_os = "espidf", target_os = "wasi")))] |
| 24 |
mod types; |
| 25 |
|
| 26 |
#[cfg(not(any( |
| 27 |
target_os = "cygwin", |
| 28 |
target_os = "espidf", |
| 29 |
target_os = "haiku", |
| 30 |
target_os = "wasi", |
| 31 |
)))] |
| 32 |
pub use ioctl::*; |
| 33 |
#[cfg(not(target_os = "wasi"))] |
| 34 |
pub use tc::*; |
| 35 |
#[cfg(not(windows))] |
| 36 |
pub use tty::*; |
| 37 |
#[cfg(not(any(target_os = "espidf", target_os = "wasi")))] |
| 38 |
pub use types::*; |