Available on crate feature
termios only.Expand description
Terminal I/O stream operations.
This API automatically supports setting arbitrary I/O speeds, on any platform that supports them, including Linux and the BSDs.
The speed module contains various predefined speed constants which are
more likely to be portable, however any u32 value can be passed to
Termios::set_speed, Termios::set_input_speed, and
Termios::set_output_speed, and they will simply fail if the speed is
not supported by the platform or the device.
Modules§
- speed
Neither target_os=espidfnor WASI - Speeds for use with
Termios::set_speed,Termios::set_input_speed, andTermios::set_output_speed.
Structs§
- Control
Modes Neither target_os=espidfnor WASI - Flags controlling special terminal modes.
- Input
Modes Neither target_os=espidfnor WASI - Flags controlling terminal input.
- Local
Modes Neither target_os=espidfnor WASI - Flags controlling “local” terminal modes.
- Output
Modes Neither target_os=espidfnor WASI - Flags controlling terminal output.
- Pid
pid_t—A non-zero Unix process ID.- Special
Code Index Neither target_os=espidfnor WASI - Indices for use with
Termios::special_codes. - Special
Codes Neither target_os=espidfnor WASI - An array indexed by
SpecialCodeIndexindicating the current values of various special control codes. - Termios
Neither target_os=espidfnor WASI struct termiosfor use withtcgetattrandtcsetattr.- Winsize
Neither target_os=espidfnor WASI struct winsizefor use withtcgetwinsize.
Enums§
- Action
Neither target_os=espidfnor WASI TC*values for use withtcflow.- Optional
Actions Neither target_os=espidfnor WASI TCSA*values for use withtcsetattr.- Queue
Selector Neither target_os=espidfnor WASI TC*values for use withtcflush.
Functions§
- ioctl_
tiocexcl Neither Cygwin nor target_os=espidfnor Haiku nor WASI and neither Windows nortarget_os=horizonnor Redox nor WASI ioctl(fd, TIOCEXCL)—Enables exclusive mode on a terminal.- ioctl_
tiocnxcl Neither Cygwin nor target_os=espidfnor Haiku nor WASI and neither Windows nortarget_os=horizonnor Redox nor WASI ioctl(fd, TIOCNXCL)—Disables exclusive mode on a terminal.- isatty
Non-Windows isatty(fd)—Tests whether a file descriptor refers to a terminal.- tcdrain
Non-WASI and non- target_os=espidf tcdrain(fd, duration)—Wait until all pending output has been written.- tcflow
Non-WASI and non- target_os=espidf tcflow(fd, action)—Suspend or resume transmission or reception.- tcflush
Non-WASI and non- target_os=espidf tcflush(fd, queue_selector)—Wait until all pending output has been written.- tcgetattr
Non-WASI and neither Windows nor target_os=espidfnor WASI tcgetattr(fd)—Get terminal attributes.- tcgetpgrp
Non-WASI and neither Windows nor WASI tcgetpgrp(fd)—Get the terminal foreground process group.- tcgetsid
Non-WASI tcgetsid(fd)—Return the session ID of the current session withfdas its controlling terminal.- tcgetwinsize
Non-WASI and neither Windows nor target_os=horizonnortarget_os=espidfnor WASI tcgetwinsize(fd)—Get the current terminal window size.- tcsendbreak
Non-WASI tcsendbreak(fd, 0)—Transmit zero-valued bits.- tcsetattr
Non-WASI and non- target_os=espidf tcsetattr(fd)—Set terminal attributes.- tcsetpgrp
Non-WASI and neither Windows nor WASI tcsetpgrp(fd, pid)—Set the terminal foreground process group.- tcsetwinsize
Non-WASI and neither target_os=espidfnortarget_os=horizon tcsetwinsize(fd)—Set the current terminal window size.- ttyname
fsandalloc ttyname_r(fd)—Returns the name of the tty open onfd.