Function termwiz::terminal::new_terminal
source · pub fn new_terminal(caps: Capabilities) -> Result<impl Terminal>
Expand description
Construct a new instance of Terminal.
The terminal will have a renderer that is influenced by the configuration
in the provided Capabilities
instance.
The terminal will explicitly open /dev/tty
on Unix systems and
CONIN$
and CONOUT$
on Windows systems, so that it should yield a
functioning console with minimal headaches.
If you have a more advanced use case you will want to look to the
constructors for UnixTerminal
and WindowsTerminal
and call whichever
one is most suitable for your needs.