Expand description
Cross-platform terminal screen clearing.
This library provides a set of ways to clear a screen, plus a “best effort” convenience function to do the right thing most of the time.
Unlike many cross-platform libraries, this one exposes every available choice all the time, and only the convenience function varies based on compilation target or environmental factors.
90% of the time, you’ll want to use the convenience short-hand:
clearscreen::clear().expect("failed to clear screen");
For anything else, refer to the ClearScreen
enum.
If you are supporting Windows in any capacity, the is_windows_10()
documentation is
required reading.
Structs§
- NixError
- Nix error type.
- Terminfo
Error - Terminfo error type.
Enums§
- Clear
Screen - Ways to clear the screen.
- Error
- Error type.
Functions§
- clear
- Shorthand for
ClearScreen::default().clear()
. - is_
microsoft_ terminal - Detects Microsoft Terminal.
- is_
windows_ 10 - Detects Windows ≥10.