Close the tty device.
Flush output.
Make the terminal suitable for raw mode input. In this mode the terminal is not suitable for typical interactive shell use, but is good if absolute control over input is needed. After this, reads will block until one character is presented. (Same effect as 'blocking(true)'.
Read input. May return an empty slice if no data is present and blocking is disabled.
Resized returns true if the window was resized since last checked. Normally resize will force the window into non-blocking mode so that the caller can see the resize in a timely fashion. This is edge triggered (reading it will clear the value.)
Restore tty settings saved with save().
Save current tty settings. These can be subsequently restored using restore.
Start termio. This will open the device.
Stop input scanning.
Wake up any reader blocked in read().
Get window size.
Write output.
Tty is the interface that implementations should override or supply to support terminal I/O ioctls or equivalent functionality. It is provided in this form, as some implementations may not be based on actual tty devices.